Package com.mongodb.client.model.geojson
Class Geometry
java.lang.Object
com.mongodb.client.model.geojson.Geometry
- Direct Known Subclasses:
 GeometryCollection,LineString,MultiLineString,MultiPoint,MultiPolygon,Point,Polygon
An abstract class for representations of GeoJSON geometry objects.
- Since:
 - 3.1
 
- 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGeometry()Construct an instance with no specified coordinate reference system.protectedGeometry(CoordinateReferenceSystem coordinateReferenceSystem) Construct an instance with the specified coordinate reference system. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the coordinate reference system, which may be nullabstract GeoJsonObjectTypegetType()Gets the GeoJSON object type.inthashCode()toJson()Converts to GeoJSON representation 
- 
Constructor Details
- 
Geometry
protected Geometry()Construct an instance with no specified coordinate reference system. - 
Geometry
Construct an instance with the specified coordinate reference system.- Parameters:
 coordinateReferenceSystem- the coordinate reference system
 
 - 
 - 
Method Details
- 
getType
Gets the GeoJSON object type.- Returns:
 - the type
 
 - 
toJson
Converts to GeoJSON representation- Returns:
 - the GeoJSON representation
 
 - 
getCoordinateReferenceSystem
Gets the coordinate reference system, which may be null- Returns:
 - the possibly-null coordinate reference system
 
 - 
equals
 - 
hashCode
public int hashCode() 
 -