throw new Error("not implemented");
if (isEmpty()) return true;  if (holes.size() != 0 || solids.size() != 1) return false;  Segment path = (Segment) solids.elementAt(0); if (! path.isPolygonal()) return false;  int nCorners = 0; Segment s = path; do { Segment s2 = s.next; double d1 = (s.P2.getX() - s.P1.getX())*(s2.P2.getX() - s2.P1.getX())/ ((s.P1.distance(s.P2)) * (s2.P1.distance(s2.P2))); double d2 = (s.P2.getY() - s.P1.getY())*(s2.P2.getY() - s2.P1.getY())/ ((s.P1.distance(s.P2)) * (s2.P1.distance(s2.P2))); double dotproduct = d1 + d2;   if (d1 != 0 && d2 != 0) return false;  if (Math.abs(dotproduct) == 0) nCorners++; else if ((Math.abs(1.0 - dotproduct) > 0)) return false;  s = s.next;
  public boolean isRectangular()  {    // XXX Implement.    throw new Error("not implemented");  }