Record Class H3Index

java.lang.Object
java.lang.Record
types.generated.H3Index

public record H3Index(long value) extends Record
A cell of the H3 grid, the base type of TH3Index and H3IndexSet. MEOS passes it by value, as a uint64; it is a class all the same because it reads and writes formats of its own (text, WKB, hex WKB), and every type a binding exposes has its readers and writers.

MEOS passes it by value, as its C type H3Index: 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
    H3Index(long value)
    Creates an instance of a H3Index record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    asHexWKB(byte variant)
    asHexWKB, through MEOS h3index_as_hexwkb.
    asText, through MEOS h3index_out.
    byte[]
    asWKB(byte variant)
    asWKB, through MEOS h3index_as_wkb.
    final boolean
    Indicates whether some other object is "equal to" this one.
    static H3Index
    fromHexWKB, through MEOS h3index_from_hexwkb.
    static H3Index
    fromText, through MEOS h3index_in.
    static H3Index
    fromWKB(byte[] wkb)
    fromWKB, through MEOS h3index_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

    • H3Index

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

    • asHexWKB

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

      public static H3Index fromHexWKB(String hexwkb)
      fromHexWKB, through MEOS h3index_from_hexwkb.
    • asText

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

      public static H3Index fromText(String str)
      fromText, through MEOS h3index_in.
    • asWKB

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

      public static H3Index fromWKB(byte[] wkb)
      fromWKB, through MEOS h3index_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