Class BooleanPortability

java.lang.Object
org.terracotta.offheapstore.storage.portability.BooleanPortability
All Implemented Interfaces:
Portability<Boolean>

public class BooleanPortability extends Object implements Portability<Boolean>
  • Field Details

  • Constructor Details

    • BooleanPortability

      private BooleanPortability()
  • Method Details

    • encode

      public ByteBuffer encode(Boolean object)
      Description copied from interface: Portability
      Encodes an object of type T as a ByteBuffer.
      Specified by:
      encode in interface Portability<Boolean>
      Parameters:
      object - object to be encoded
      Returns:
      the encoded object
    • decode

      public Boolean decode(ByteBuffer buffer)
      Description copied from interface: Portability
      Decodes a ByteBuffer to an object of type T.
      Specified by:
      decode in interface Portability<Boolean>
      Parameters:
      buffer - bytes to decode
      Returns:
      the decoded object
    • equals

      public boolean equals(Object object, ByteBuffer buffer)
      Description copied from interface: Portability
      Returns true if the encoded object once decoded would be Object.equals(Object) to the supplied object.
      Specified by:
      equals in interface Portability<Boolean>
      Parameters:
      object - object to compare to
      buffer - buffer containing encoded object
      Returns:
      true if the two parameters are "equal"