Class ObjectDataType.AutoDetectDataType<T>
java.lang.Object
org.h2.mvstore.type.BasicDataType<T>
org.h2.mvstore.type.ObjectDataType.AutoDetectDataType<T>
- All Implemented Interfaces:
Comparator<T>, DataType<T>
- Direct Known Subclasses:
ObjectDataType.BigDecimalType, ObjectDataType.BigIntegerType, ObjectDataType.BooleanType, ObjectDataType.ByteType, ObjectDataType.CharacterType, ObjectDataType.DateType, ObjectDataType.DoubleType, ObjectDataType.FloatType, ObjectDataType.IntegerType, ObjectDataType.LongType, ObjectDataType.NullType, ObjectDataType.ObjectArrayType, ObjectDataType.SerializedObjectType, ObjectDataType.ShortType, ObjectDataType.StringType, ObjectDataType.UUIDType
- Enclosing class:
ObjectDataType
The base class for auto-detect data types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectDataType(package private) final intThe type id. -
Constructor Summary
ConstructorsConstructorDescriptionAutoDetectDataType(int typeId) AutoDetectDataType(ObjectDataType base, int typeId) -
Method Summary
Modifier and TypeMethodDescriptionintCalculates the amount of used memory in bytes.Get the type for the given object.(package private) abstract Objectread(ByteBuffer buff, int tag) Read an object from the buffer.voidwrite(WriteBuffer buff, T o) Write an object.Methods inherited from class BasicDataType
binarySearch, cast, compare, equals, hashCode, isMemoryEstimationAllowed, read, 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, thenComparingLongMethods inherited from interface DataType
createStorage
-
Field Details
-
base
-
typeId
final int typeIdThe type id.
-
-
Constructor Details
-
AutoDetectDataType
AutoDetectDataType(int typeId) -
AutoDetectDataType
AutoDetectDataType(ObjectDataType base, int typeId)
-
-
Method Details
-
getMemory
-
write
Description copied from interface:DataTypeWrite an object. -
getType
-
read
Read an object from the buffer.- Parameters:
buff- the buffertag- the first byte of the object (usually the type)- Returns:
- the read object
-