package gr.uoa.di.web.utils.ep;

public class Edge {
	private String type;
	private long source;
	private long target;
	
	public Edge(String type, long source, long target) {
		this.type = type;
		this.source = source;
		this.target = target;
	}
	
	public String getType() {
		return type;
	}
	
	public long getSource() {
		return source;
	}
	
	public long getTarget() {
		return target;
	}
	
	@Override
	public int hashCode() {
		return (int) (type.hashCode() + source + target);
	}
	
	@Override
	public boolean equals(Object object) {
		if (object == this)
			return true;
		if (!(object instanceof Edge))
			return false;
		Edge edge = (Edge) object;
		return type.equals(edge.getType()) && (source == edge.getSource()) && (target == edge.getTarget());
	}
}
