Class BooleanPortability
java.lang.Object
org.terracotta.offheapstore.storage.portability.BooleanPortability
- All Implemented Interfaces:
Portability<Boolean>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ByteBufferstatic final BooleanPortabilityprivate static final ByteBuffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(ByteBuffer buffer) Decodes aByteBufferto an object of typeT.Encodes an object of typeTas aByteBuffer.booleanequals(Object object, ByteBuffer buffer) Returns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.
-
Field Details
-
INSTANCE
-
TRUE
-
FALSE
-
-
Constructor Details
-
BooleanPortability
private BooleanPortability()
-
-
Method Details
-
encode
Description copied from interface:PortabilityEncodes an object of typeTas aByteBuffer.- Specified by:
encodein interfacePortability<Boolean>- Parameters:
object- object to be encoded- Returns:
- the encoded object
-
decode
Description copied from interface:PortabilityDecodes aByteBufferto an object of typeT.- Specified by:
decodein interfacePortability<Boolean>- Parameters:
buffer- bytes to decode- Returns:
- the decoded object
-
equals
Description copied from interface:PortabilityReturns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.- Specified by:
equalsin interfacePortability<Boolean>- Parameters:
object- object to compare tobuffer- buffer containing encoded object- Returns:
trueif the two parameters are "equal"
-