public boolean contains(Point2D p) { for (Segment2D s : this) if (s.contains(p)) return true; return false; }