Record Class RuntimeEvent

java.lang.Object
java.lang.Record
org.maplibre.nativeffi.runtime.RuntimeEvent

public record RuntimeEvent(RuntimeEventType type, int rawType, RuntimeEventSourceType sourceType, int rawSourceType, Optional<RuntimeHandle> runtimeSource, Optional<MapHandle> mapSource, int code, int rawPayloadType, RuntimeEventPayload payload, String message) extends Record
Event copied from a runtime's native event queue.
  • Constructor Details

    • RuntimeEvent

      public RuntimeEvent(RuntimeEventType type, int rawType, RuntimeEventSourceType sourceType, int rawSourceType, Optional<RuntimeHandle> runtimeSource, Optional<MapHandle> mapSource, int code, int rawPayloadType, RuntimeEventPayload payload, String message)
      Creates an instance of a RuntimeEvent record class.
      Parameters:
      type - the value for the type record component
      rawType - the value for the rawType record component
      sourceType - the value for the sourceType record component
      rawSourceType - the value for the rawSourceType record component
      runtimeSource - the value for the runtimeSource record component
      mapSource - the value for the mapSource record component
      code - the value for the code record component
      rawPayloadType - the value for the rawPayloadType record component
      payload - the value for the payload record component
      message - the value for the message 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • type

      public RuntimeEventType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • rawType

      public int rawType()
      Returns the value of the rawType record component.
      Returns:
      the value of the rawType record component
    • sourceType

      public RuntimeEventSourceType sourceType()
      Returns the value of the sourceType record component.
      Returns:
      the value of the sourceType record component
    • rawSourceType

      public int rawSourceType()
      Returns the value of the rawSourceType record component.
      Returns:
      the value of the rawSourceType record component
    • runtimeSource

      public Optional<RuntimeHandle> runtimeSource()
      Returns the value of the runtimeSource record component.
      Returns:
      the value of the runtimeSource record component
    • mapSource

      public Optional<MapHandle> mapSource()
      Returns the value of the mapSource record component.
      Returns:
      the value of the mapSource record component
    • code

      public int code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • rawPayloadType

      public int rawPayloadType()
      Returns the value of the rawPayloadType record component.
      Returns:
      the value of the rawPayloadType record component
    • payload

      public RuntimeEventPayload payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component