|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.mvstore.type.ObjectType
public class ObjectType
A data type implementation for the most common data types, including serializable objects.
| Nested Class Summary | |
|---|---|
class |
ObjectType.LongType
The type for long objects. |
| Constructor Summary | |
|---|---|
ObjectType()
|
|
| Method Summary | |
|---|---|
java.lang.String |
asString()
Get the stable string representation that is used to build this data type. |
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two keys. |
static int |
compareNotNull(char[] data1,
char[] data2)
Compare the contents of two arrays. |
static int |
compareNotNull(int[] data1,
int[] data2)
Compare the contents of two arrays. |
static int |
compareNotNull(long[] data1,
long[] data2)
Compare the contents of two arrays. |
int |
getMaxLength(java.lang.Object obj)
Get the maximum length in bytes used to store an object. |
int |
getMemory(java.lang.Object obj)
Estimate the used memory in bytes. |
java.lang.Object |
read(java.nio.ByteBuffer buff)
Read an object. |
void |
write(java.nio.ByteBuffer buff,
java.lang.Object obj)
Write the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectType()
| Method Detail |
|---|
public int compare(java.lang.Object a,
java.lang.Object b)
DataType
compare in interface DataTypea - the first keyb - the second key
public int getMaxLength(java.lang.Object obj)
DataType
getMaxLength in interface DataTypeobj - the object
public int getMemory(java.lang.Object obj)
DataType
getMemory in interface DataTypeobj - the object
public void write(java.nio.ByteBuffer buff,
java.lang.Object obj)
DataType
write in interface DataTypebuff - the target bufferobj - the valuepublic java.lang.Object read(java.nio.ByteBuffer buff)
DataType
read in interface DataTypebuff - the source buffer
public java.lang.String asString()
DataTypeTo avoid conflict with the default factory, the returned string should start with the package name of the type factory.
asString in interface DataType
public static int compareNotNull(char[] data1,
char[] data2)
data1 - the first array (must not be null)data2 - the second array (must not be null)
public static int compareNotNull(int[] data1,
int[] data2)
data1 - the first array (must not be null)data2 - the second array (must not be null)
public static int compareNotNull(long[] data1,
long[] data2)
data1 - the first array (must not be null)data2 - the second array (must not be null)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||