public class BooleanPortability extends Object implements Portability<Boolean>
| Modifier and Type | Field and Description |
|---|---|
static BooleanPortability |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
decode(ByteBuffer buffer)
Decodes a
ByteBuffer to an object of type T. |
ByteBuffer |
encode(Boolean object)
Encodes an object of type
T as a ByteBuffer. |
boolean |
equals(Object object,
ByteBuffer buffer)
Returns true if the encoded object once decoded would be
Object.equals(Object) to the supplied object. |
public static final BooleanPortability INSTANCE
public ByteBuffer encode(Boolean object)
PortabilityT as a ByteBuffer.encode in interface Portability<Boolean>object - object to be encodedpublic Boolean decode(ByteBuffer buffer)
PortabilityByteBuffer to an object of type T.decode in interface Portability<Boolean>buffer - bytes to decodepublic boolean equals(Object object, ByteBuffer buffer)
PortabilityObject.equals(Object) to the supplied object.equals in interface Portability<Boolean>object - object to compare tobuffer - buffer containing encoded objecttrue if the two parameters are "equal"Copyright © 2015–2024. All rights reserved.