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