Package com.mongodb.client.model.geojson
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 Summary
Constructors Constructor Description GeometryCollection(CoordinateReferenceSystem coordinateReferenceSystem, java.util.List<? extends Geometry> geometries)Construct an instance with the given list of Geometry objectsGeometryCollection(java.util.List<? extends Geometry> geometries)Construct an instance with the given list of Geometry objects
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<? extends Geometry>getGeometries()Gets the list of Geometry objects in this collection.GeoJsonObjectTypegetType()Gets the GeoJSON object type.inthashCode()java.lang.StringtoString()-
Methods inherited from class com.mongodb.client.model.geojson.Geometry
getCoordinateReferenceSystem, toJson
-
-
-
-
Constructor Detail
-
GeometryCollection
public GeometryCollection(java.util.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, java.util.List<? extends Geometry> geometries)
Construct an instance with the given list of Geometry objects- Parameters:
coordinateReferenceSystem- the coordinate reference systemgeometries- the list of Geometry objects
-
-
Method Detail
-
getType
public GeoJsonObjectType getType()
Description copied from class:GeometryGets the GeoJSON object type.
-
getGeometries
public java.util.List<? extends Geometry> getGeometries()
Gets the list of Geometry objects in this collection.- Returns:
- the list
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-