Record Class GeometryCollection

java.lang.Object
java.lang.Record
io.micronaut.data.model.geo.GeometryCollection
Record Components:
geometries - the geometries contained in this collection
All Implemented Interfaces:
Geometry

@TypeDef(type=STRING, converter=GeometryJsonConverter.class) public record GeometryCollection(List<Geometry> geometries) extends Record implements Geometry
Represents a heterogeneous collection of Geometry values.

This type follows the GeoJSON GeometryCollection model and can contain any supported Micronaut Data geometry implementation.

Since:
5.0
  • Constructor Details

    • GeometryCollection

      public GeometryCollection(List<Geometry> geometries)
      Creates an instance of a GeometryCollection record class.
      Parameters:
      geometries - the value for the geometries record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • geometries

      public List<Geometry> geometries()
      Returns the value of the geometries record component.
      Returns:
      the value of the geometries record component