Ejemplo n.º 1
0
 public boolean equals(Object object) {
   if (!(object instanceof ShapeEdge)) return false;
   ShapeEdge edge = (ShapeEdge) object;
   if (startPoint.equals(edge.getStartPoint()) && endPoint.equals(edge.getEndPoint())) return true;
   if (startPoint.equals(edge.getEndPoint()) && endPoint.equals(edge.getStartPoint())) return true;
   return false;
 }
Ejemplo n.º 2
0
  public boolean coincides(ShapeEdge other) {
    if (this.isHorizontal() && other.isVertical()) return false;
    if (other.isHorizontal() && this.isVertical()) return false;

    return false;
  }