@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		} else if (obj == null) {
			return false;
		} else  if (getClass() != obj.getClass()) {
			return false;
		}
		
		Segment other = (Segment) obj;
		if (p1.equals(other.p1)
				&& p2.equals(other.p2)) {
			return true;
		} else if (p1.equals(other.p2)
				&& p2.equals(other.p1)) {
			return true;
		} else {
			return false;
		}
	}