Class MultiLineString
java.lang.Object
org.apache.tinkerpop.gremlin.structure.geo.Geometry
org.apache.tinkerpop.gremlin.structure.geo.GeometryCollection
org.apache.tinkerpop.gremlin.structure.geo.MultiCurve
org.apache.tinkerpop.gremlin.structure.geo.MultiLineString
- All Implemented Interfaces:
Comparable<Geometry>
A multi-line string geometry containing zero or more line strings.
MultiLineStrings are immutable.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic MultiLineStringempty()Creates an empty multi-line string withModel.CARTESIANmodel.static MultiLineStringCreates an empty multi-line string with the specified model.booleanExact equality: same type, same SRID, same coordinates (including z flag).Returns an unmodifiable list of the line strings in this multi-line string.inthashCode()Hash code consistent with equals.booleanisEmpty()Returns true if this geometry is empty (has no coordinates).static MultiLineStringof(LineString... lineStrings) Creates a multi-line string from an array of line strings.Methods inherited from class org.apache.tinkerpop.gremlin.structure.geo.GeometryCollection
of
-
Method Details
-
of
Creates a multi-line string from an array of line strings. All line strings must have the same SRID and z-dimension flag. A multi-line string must have at least 1 line string; useempty()orempty(Model)for an empty multi-line string. An element may be an empty line string.- Parameters:
lineStrings- the line strings, at least 1 of them- Returns:
- the multi-line string
- Throws:
IllegalArgumentException- iflineStringsis null, if it holds no line strings, if any element is null, or if the line strings do not all have the same SRID and the same z dimension- Since:
- 4.0.0
-
empty
Creates an empty multi-line string withModel.CARTESIANmodel.- Returns:
- an empty multi-line string
- Since:
- 4.0.0
-
empty
Creates an empty multi-line string with the specified model.- Parameters:
model-Model.CARTESIANorModel.GEOGRAPHIC- Returns:
- an empty multi-line string
- Throws:
IllegalArgumentException- ifmodelisModel.OTHERor null- Since:
- 4.0.0
-
geometries
Returns an unmodifiable list of the line strings in this multi-line string.- Overrides:
geometriesin classGeometryCollection- Returns:
- the line strings, an empty list when this multi-line string holds no parts
- Since:
- 4.0.0
-
isEmpty
public boolean isEmpty()Description copied from class:GeometryReturns true if this geometry is empty (has no coordinates). For collections, returns true if all parts are empty.- Overrides:
isEmptyin classGeometryCollection- Returns:
- true if empty
-
equals
Description copied from class:GeometryExact equality: same type, same SRID, same coordinates (including z flag). Coordinates are compared numerically, so -0.0 equals 0.0.- Overrides:
equalsin classGeometryCollection
-
hashCode
public int hashCode()Description copied from class:GeometryHash code consistent with equals. Zero values are normalized so -0.0 and 0.0 hash alike.- Overrides:
hashCodein classGeometryCollection
-