Record Class S2Cell

java.lang.Object
java.lang.Record
types.generated.S2Cell

public record S2Cell(long value) extends Record
A cell of the S2 grid, the base type of TS2Cell and S2CellSet, passed by value as H3Index is.

MEOS passes it by value, as its C type S2CellId: the record holds that value.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final long
    The field for the value record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    S2Cell(long value)
    Creates an instance of a S2Cell record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    asHexWKB(byte variant)
    asHexWKB, through MEOS s2cell_as_hexwkb.
    asText, through MEOS s2cell_out.
    byte[]
    asWKB(byte variant)
    asWKB, through MEOS s2cell_as_wkb.
    final boolean
    Indicates whether some other object is "equal to" this one.
    static S2Cell
    fromHexWKB, through MEOS s2cell_from_hexwkb.
    static S2Cell
    fromText, through MEOS s2cell_in.
    static S2Cell
    fromWKB(byte[] wkb)
    fromWKB, through MEOS s2cell_from_wkb.
    final int
    Returns a hash code value for this object.
    The text MEOS writes this value as.
    long
    Returns the value of the value record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • value

      private final long value
      The field for the value record component.
  • Constructor Details

    • S2Cell

      public S2Cell(long value)
      Creates an instance of a S2Cell record class.
      Parameters:
      value - the value for the value record component
  • Method Details

    • asHexWKB

      public String asHexWKB(byte variant)
      asHexWKB, through MEOS s2cell_as_hexwkb.
    • fromHexWKB

      public static S2Cell fromHexWKB(String hexwkb)
      fromHexWKB, through MEOS s2cell_from_hexwkb.
    • asText

      public String asText()
      asText, through MEOS s2cell_out.
    • fromText

      public static S2Cell fromText(String str)
      fromText, through MEOS s2cell_in.
    • asWKB

      public byte[] asWKB(byte variant)
      asWKB, through MEOS s2cell_as_wkb.
    • fromWKB

      public static S2Cell fromWKB(byte[] wkb)
      fromWKB, through MEOS s2cell_from_wkb.
    • toString

      public String toString()
      The text MEOS writes this value as.
      Specified by:
      toString in class Record
    • 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 '=='.
      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.
    • value

      public long value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component