package graph;


public class Edge 
{
	Vertice _fromVert;
	Vertice _toVert;

	protected long _id;
	protected int _type = 0;
	
	protected static final int SUPER = 5;
	protected static final int SUB = 6;
	protected static final int USES = 7;
	protected static final int ONE_AMONG = 8;
	protected static final int FOR = 9;
	
	public Edge(Vertice a, Vertice b)
	{
		_fromVert = a;
		_toVert = b;
	}
	
	public Edge()
	{
		
	}
	
	public long getId()
	{
		return _id;
	}
	
	public void setId(long id)
	{
		_id = id;
	}
	
	public int getType()
	{
		return _type;
	}
	
	public void setType(int type)
	{
		_type = type;
	}
	
	public boolean equals(Object o)
	{
		if(o.getClass().getCanonicalName() == this.getClass().getCanonicalName())
		{
			Edge me = (Edge)o;
			if(me.getFromVert() == _fromVert && me.getToVert() == _toVert)
			{
				return true;
			}
		}
		
		return false;
	}
	
	
	public Vertice getFromVert() 
	{
		return _fromVert;
	}
	
	public void setFromVert(Vertice vert) 
	{
		_fromVert = vert;
	}
	
	public Vertice getToVert() 
	{
		return _toVert;
	}
	
	public void setToVert(Vertice vert) 
	{
		_toVert = vert;
	}
}
