Interface Portability<T>
-
- Type Parameters:
T- type handled by this converter
- All Known Subinterfaces:
PersistentPortability<T>,WriteBackPortability<T>
- All Known Implementing Classes:
BooleanPortability,ByteArrayPortability,PersistentByteArrayPortability,PersistentSerializablePortability,SerializablePortability,StringPortability
public interface Portability<T>An object to ByteBuffer converter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tdecode(java.nio.ByteBuffer buffer)Decodes aByteBufferto an object of typeT.java.nio.ByteBufferencode(T object)Encodes an object of typeTas aByteBuffer.booleanequals(java.lang.Object object, java.nio.ByteBuffer buffer)Returns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.
-
-
-
Method Detail
-
encode
java.nio.ByteBuffer encode(T object)
Encodes an object of typeTas aByteBuffer.- Parameters:
object- object to be encoded- Returns:
- the encoded object
-
decode
T decode(java.nio.ByteBuffer buffer)
Decodes aByteBufferto an object of typeT.- Parameters:
buffer- bytes to decode- Returns:
- the decoded object
-
equals
boolean equals(java.lang.Object object, java.nio.ByteBuffer buffer)Returns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.- Parameters:
object- object to compare tobuffer- buffer containing encoded object- Returns:
trueif the two parameters are "equal"
-
-