Interface RawValueData<T>

  • Type Parameters:
    T - originating class for the raw value
    All Known Implementing Classes:
    BinaryRawValueData

    @PublicEvolving
    public interface RawValueData<T>
    An internal data structure representing data of RawType.

    This data structure is immutable.

    • Method Detail

      • toObject

        T toObject​(TypeSerializer<T> serializer)
        Converts this RawValueData into a Java object.

        The given serializer is required because the "raw value" might be represented in a binary format and needs to be deserialized first.

        Note: The returned Java object may be reused.

      • toBytes

        byte[] toBytes​(TypeSerializer<T> serializer)
        Converts this RawValueData into a byte array.

        The given serializer is required because the "raw value" might be still be a Java object and needs to be serialized first.

        Note: The returned byte array may be reused.

      • fromObject

        static <T> RawValueData<T> fromObject​(T javaObject)
        Creates an instance of RawValueData from a Java object.
      • fromBytes

        static <T> RawValueData<T> fromBytes​(byte[] bytes)
        Creates an instance of RawValueData from the given byte array.