org.h2.mvstore.db

## Class LobStorageMap.BlobReference.Type

- java.lang.Object
- - org.h2.mvstore.type.BasicDataType<LobStorageMap.BlobReference>
  - - org.h2.mvstore.db.LobStorageMap.BlobReference.Type

All Implemented Interfaces:
  java.util.Comparator<LobStorageMap.BlobReference>, DataType<LobStorageMap.BlobReference>

Enclosing class:
  LobStorageMap.BlobReference

    public static final class LobStorageMap.BlobReference.Type
    extends BasicDataType<LobStorageMap.BlobReference>

### Field Summary

Fields
`static LobStorageMap.BlobReference.Type` `INSTANCE`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compare(LobStorageMap.BlobReference one, LobStorageMap.BlobReference two)` Compare two keys.
`LobStorageMap.BlobReference[]` `createStorage(int size)` Create storage object of array type to hold values
`int` `getMemory(LobStorageMap.BlobReference blobReference)` Calculates the amount of used memory in bytes.
`LobStorageMap.BlobReference` `read(java.nio.ByteBuffer buff)` Read an object.
`void` `write(WriteBuffer buff, LobStorageMap.BlobReference blobReference)` Write an object.

### Methods inherited from class org.h2.mvstore.type.BasicDataType

`binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, write`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

### Field Detail

#### INSTANCE

    public static final LobStorageMap.BlobReference.Type INSTANCE

### Method Detail

#### getMemory

    public int getMemory(LobStorageMap.BlobReference blobReference)

Description copied from interface: `DataType`
Calculates the amount of used memory in bytes.

Specified by:
  `getMemory` in interface `DataType<LobStorageMap.BlobReference>`
Specified by:
  `getMemory` in class `BasicDataType<LobStorageMap.BlobReference>`
Parameters:
  `blobReference` - the object
Returns:
  the used memory

#### compare

    public int compare(LobStorageMap.BlobReference one,
                       LobStorageMap.BlobReference two)

Description copied from interface: `DataType`
Compare two keys.

Specified by:
  `compare` in interface `java.util.Comparator<LobStorageMap.BlobReference>`
Specified by:
  `compare` in interface `DataType<LobStorageMap.BlobReference>`
Overrides:
  `compare` in class `BasicDataType<LobStorageMap.BlobReference>`
Parameters:
  `one` - the first key
  `two` - the second key
Returns:
  -1 if the first key is smaller, 1 if larger, and 0 if equal

#### write

    public void write(WriteBuffer buff,
                      LobStorageMap.BlobReference blobReference)

Description copied from interface: `DataType`
Write an object.

Specified by:
  `write` in interface `DataType<LobStorageMap.BlobReference>`
Specified by:
  `write` in class `BasicDataType<LobStorageMap.BlobReference>`
Parameters:
  `buff` - the target buffer
  `blobReference` - the value

#### read

    public LobStorageMap.BlobReference read(java.nio.ByteBuffer buff)

Description copied from interface: `DataType`
Read an object.

Specified by:
  `read` in interface `DataType<LobStorageMap.BlobReference>`
Specified by:
  `read` in class `BasicDataType<LobStorageMap.BlobReference>`
Parameters:
  `buff` - the source buffer
Returns:
  the object

#### createStorage

    public LobStorageMap.BlobReference[] createStorage(int size)

Description copied from interface: `DataType`
Create storage object of array type to hold values

Parameters:
  `size` - number of values to hold
Returns:
  storage object