Class GeometryCollection

java.lang.Object
com.mongodb.client.model.geojson.Geometry
com.mongodb.client.model.geojson.GeometryCollection

public final class GeometryCollection extends Geometry
A representation of a GeoJSON GeometryCollection.
Since:
3.1
  • Constructor Details

    • GeometryCollection

      public GeometryCollection(List<? extends Geometry> geometries)
      Construct an instance with the given list of Geometry objects
      Parameters:
      geometries - the list of Geometry objects
    • GeometryCollection

      public GeometryCollection(@Nullable CoordinateReferenceSystem coordinateReferenceSystem, List<? extends Geometry> geometries)
      Construct an instance with the given list of Geometry objects
      Parameters:
      coordinateReferenceSystem - the coordinate reference system
      geometries - the list of Geometry objects
  • Method Details

    • getType

      public GeoJsonObjectType getType()
      Description copied from class: Geometry
      Gets the GeoJSON object type.
      Specified by:
      getType in class Geometry
      Returns:
      the type
    • getGeometries

      public List<? extends Geometry> getGeometries()
      Gets the list of Geometry objects in this collection.
      Returns:
      the list
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Geometry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Geometry
    • toString

      public String toString()
      Overrides:
      toString in class Object