org.terracotta.offheapstore.storage.portability
Class BooleanPortability
java.lang.Object
org.terracotta.offheapstore.storage.portability.BooleanPortability
- All Implemented Interfaces:
- Portability<Boolean>
public class BooleanPortability
- extends Object
- implements Portability<Boolean>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final BooleanPortability INSTANCE
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 tobuffer - buffer containing encoded object
- Returns:
true if the two parameters are "equal"
Copyright © 2016. All Rights Reserved.