Package org.h2.test.store
Class RowDataType
- All Implemented Interfaces:
Comparator<Object[]>,DataType<Object[]>
A row type.
-
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.Object[]read(ByteBuffer buff) Read an object.voidwrite(WriteBuffer buff, Object[] x) Write an object.Methods inherited from class org.h2.mvstore.type.BasicDataType
binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, writeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
createStorage
Description copied from interface:DataTypeCreate storage object of array type to hold values- Parameters:
size- number of values to hold- Returns:
- storage object
-
compare
Description copied from interface:DataTypeCompare two keys.- Specified by:
comparein interfaceComparator<Object[]>- Specified by:
comparein interfaceDataType<Object[]>- Overrides:
comparein classBasicDataType<Object[]>- Parameters:
ax- the first keybx- the second key- Returns:
- -1 if the first key is smaller, 1 if larger, and 0 if equal
-
getMemory
Description copied from interface:DataTypeCalculates the amount of used memory in bytes. -
read
Description copied from interface:DataTypeRead an object. -
write
Description copied from interface:DataTypeWrite an object.
-