Record Class MultiPoint
java.lang.Object
java.lang.Record
io.micronaut.data.model.geo.MultiPoint
- Record Components:
points- the points contained in this geometry
- All Implemented Interfaces:
Geometry
@TypeDef(type=STRING,
converter=GeometryJsonConverter.class)
public record MultiPoint(List<Point> points)
extends Record
implements Geometry
Represents a geometry composed of one or more
Point values.
This type follows the GeoJSON MultiPoint model and provides helpers for converting between point instances and their coordinate representation.
- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPoint(List<Point> points) Creates an instance of aMultiPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasCoords()Returns this multi-point geometry as a list of point coordinate pairs.final booleanIndicates whether some other object is "equal to" this one.static MultiPointfromCoords(List<List<Double>> coords) Creates aMultiPointfrom a list of point coordinate pairs.final inthashCode()Returns a hash code value for this object.points()Returns the value of thepointsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MultiPoint
-
-
Method Details
-
asCoords
-
fromCoords
Creates aMultiPointfrom a list of point coordinate pairs.- Parameters:
coords- the point coordinates to convert- Returns:
- a multi-point geometry 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). -
points
-