checkNotGeometryCollection static method

void checkNotGeometryCollection(
  1. Geometry g
)

Throws an exception if g's type is a GeometryCollection. (Its subclasses do not trigger an exception).

@param g the Geometry to check @throws IllegalArgumentException if g is a GeometryCollection but not one of its subclasses

Implementation

static void checkNotGeometryCollection(Geometry g) {
  if (g.isGeometryCollection()) {
    throw new ArgumentError(
        "Operation does not support GeometryCollection arguments");
  }
}