Interface Offset<T>

Type Parameters:
T - the type of the offset
All Superinterfaces:
Serializable

public interface Offset<T> extends Serializable
Generic offset without a concrete type
  • Method Details

    • update

      void update(T offset)
      Sets the current offset value
      Parameters:
      offset - the current offset value
    • getValue

      T getValue()
      Gets the offset value
      Returns:
      the offset value
    • getValue

      default <V> V getValue(Class<V> tClass)
      Gets the offset value converting it to the given type
      Parameters:
      tClass - type to convert the value to
      Returns:
      the offset value or null if it cannot be converted
    • serialize

      default ByteBuffer serialize()
      Description copied from interface: Serializable
      Serializes this offset into a buffer of bytes
      Specified by:
      serialize in interface Serializable
      Returns:
      a ByteBuffer instance with the serialized contents of this object