Record Class MultiLineString
java.lang.Object
java.lang.Record
io.micronaut.data.model.geo.MultiLineString
- Record Components:
lineStrings- the line strings contained in this geometry
- All Implemented Interfaces:
Geometry
@TypeDef(type=STRING,
converter=GeometryJsonConverter.class)
public record MultiLineString(List<LineString> lineStrings)
extends Record
implements Geometry
Represents a geometry composed of one or more
LineString values.
This type follows the GeoJSON MultiLineString model and exposes helper methods for converting to and from nested coordinate arrays.
- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLineString(List<LineString> lineStrings) Creates an instance of aMultiLineStringrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasCoords()Returns this multi-line string as a list of line coordinate sequences.final booleanIndicates whether some other object is "equal to" this one.static MultiLineStringfromCoords(List<List<List<Double>>> coords) Creates aMultiLineStringfrom a list of line coordinate sequences.final inthashCode()Returns a hash code value for this object.Returns the value of thelineStringsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MultiLineString
Creates an instance of aMultiLineStringrecord class.- Parameters:
lineStrings- the value for thelineStringsrecord component
-
-
Method Details
-
asCoords
-
fromCoords
Creates aMultiLineStringfrom a list of line coordinate sequences.- Parameters:
coords- the line coordinates to convert- Returns:
- a multi-line string created from the provided coordinates
- Throws:
IllegalArgumentException- ifcoordsisnullor empty
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
lineStrings
Returns the value of thelineStringsrecord component.- Returns:
- the value of the
lineStringsrecord component
-