Package com.mongodb.client.model.geojson
Class LineString
- java.lang.Object
 - 
- com.mongodb.client.model.geojson.Geometry
 - 
- com.mongodb.client.model.geojson.LineString
 
 
 
- 
public final class LineString extends Geometry
A representation of a GeoJSON LineString.- Since:
 - 3.1
 
 
- 
- 
Constructor Summary
Constructors Constructor Description LineString(CoordinateReferenceSystem coordinateReferenceSystem, List<Position> coordinates)Construct an instance with the given coordinates and coordinate reference system.LineString(List<Position> coordinates)Construct an instance with the given coordinates. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<Position>getCoordinates()Gets the GeoJSON coordinates of this LineString.GeoJsonObjectTypegetType()Gets the GeoJSON object type.inthashCode()StringtoString()- 
Methods inherited from class com.mongodb.client.model.geojson.Geometry
getCoordinateReferenceSystem, toJson 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
LineString
public LineString(List<Position> coordinates)
Construct an instance with the given coordinates.- Parameters:
 coordinates- the coordinates
 
- 
LineString
public LineString(@Nullable CoordinateReferenceSystem coordinateReferenceSystem, List<Position> coordinates)
Construct an instance with the given coordinates and coordinate reference system.- Parameters:
 coordinateReferenceSystem- the coordinate reference systemcoordinates- the coordinates
 
 - 
 
- 
Method Detail
- 
getType
public GeoJsonObjectType getType()
Description copied from class:GeometryGets the GeoJSON object type. 
- 
getCoordinates
public List<Position> getCoordinates()
Gets the GeoJSON coordinates of this LineString.- Returns:
 - the coordinates
 
 
 - 
 
 -