docs: public int size() {
          switch(getType()) {
              case POINT: return 1;
              case CIRCLE: return 1;
              case BOX: return 2;
              case POLYGON: return coordinates[0].length;
              default: throw new IllegalStateException("Unrecognized type: " + getType());
          }
      }