Class ObjectDataType.ObjectArrayType
java.lang.Object
org.h2.mvstore.type.BasicDataType<Object>
org.h2.mvstore.type.ObjectDataType.AutoDetectDataType<Object>
org.h2.mvstore.type.ObjectDataType.ObjectArrayType
- All Implemented Interfaces:
Comparator<Object>, DataType<Object>
- Enclosing class:
ObjectDataType
The type for object arrays.
-
Field Summary
FieldsFields inherited from class ObjectDataType.AutoDetectDataType
typeId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare two keys.Object[]createStorage(int size) Create storage object of array type to hold valuesintCalculates the amount of used memory in bytes.read(ByteBuffer buff) Read an object.read(ByteBuffer buff, int tag) Read an object from the buffer.voidwrite(WriteBuffer buff, Object obj) Write an object.Methods inherited from class ObjectDataType.AutoDetectDataType
getTypeMethods inherited from class BasicDataType
binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, writeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
elementType
-
-
Constructor Details
-
ObjectArrayType
ObjectArrayType()
-
-
Method Details
-
createStorage
-
getMemory
Description copied from interface:DataTypeCalculates the amount of used memory in bytes. -
compare
Description copied from interface:DataTypeCompare two keys.- Specified by:
comparein interfaceComparator<Object>- Specified by:
comparein interfaceDataType<Object>- Overrides:
comparein classBasicDataType<Object>- Parameters:
aObj- the first keybObj- the second key- Returns:
- -1 if the first key is smaller, 1 if larger, and 0 if equal
-
write
Description copied from interface:DataTypeWrite an object. -
read
Description copied from interface:DataTypeRead an object. -
read
Description copied from class:ObjectDataType.AutoDetectDataTypeRead an object from the buffer.- Specified by:
readin classObjectDataType.AutoDetectDataType<Object>- Parameters:
buff- the buffertag- the first byte of the object (usually the type)- Returns:
- the read object
-