Interface Portability<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T decode​(java.nio.ByteBuffer buffer)
      Decodes a ByteBuffer to an object of type T.
      java.nio.ByteBuffer encode​(T object)
      Encodes an object of type T as a ByteBuffer.
      boolean equals​(java.lang.Object object, java.nio.ByteBuffer buffer)
      Returns true if the encoded object once decoded would be Object.equals(Object) to the supplied object.
    • Method Detail

      • encode

        java.nio.ByteBuffer encode​(T object)
        Encodes an object of type T as a ByteBuffer.
        Parameters:
        object - object to be encoded
        Returns:
        the encoded object
      • decode

        T decode​(java.nio.ByteBuffer buffer)
        Decodes a ByteBuffer to an object of type T.
        Parameters:
        buffer - bytes to decode
        Returns:
        the decoded object
      • equals

        boolean equals​(java.lang.Object object,
                       java.nio.ByteBuffer buffer)
        Returns true if the encoded object once decoded would be Object.equals(Object) to the supplied object.
        Parameters:
        object - object to compare to
        buffer - buffer containing encoded object
        Returns:
        true if the two parameters are "equal"