org.h2.mvstore
Class MVMap.Builder<K,V>

java.lang.Object
  extended by org.h2.mvstore.MVMap.Builder<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
MVMap.MapBuilder<MVMap<K,V>,K,V>
Enclosing class:
MVMap<K,V>

public static class MVMap.Builder<K,V>
extends java.lang.Object
implements MVMap.MapBuilder<MVMap<K,V>,K,V>

A builder for this class.


Field Summary
protected  DataType keyType
           
protected  DataType valueType
           
 
Constructor Summary
MVMap.Builder()
          Create a new builder with the default key and value data types.
 
Method Summary
 MVMap<K,V> create()
          Create a new map of the given type.
 DataType getKeyType()
           
 DataType getValueType()
           
 MVMap.Builder<K,V> keyType(DataType keyType)
          Set the key data type.
 MVMap.Builder<K,V> valueType(DataType valueType)
          Set the value data type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyType

protected DataType keyType

valueType

protected DataType valueType
Constructor Detail

MVMap.Builder

public MVMap.Builder()
Create a new builder with the default key and value data types.

Method Detail

keyType

public MVMap.Builder<K,V> keyType(DataType keyType)
Set the key data type.

Parameters:
keyType - the key type
Returns:
this

getKeyType

public DataType getKeyType()

getValueType

public DataType getValueType()

valueType

public MVMap.Builder<K,V> valueType(DataType valueType)
Set the value data type.

Parameters:
valueType - the value type
Returns:
this

create

public MVMap<K,V> create()
Description copied from interface: MVMap.MapBuilder
Create a new map of the given type.

Specified by:
create in interface MVMap.MapBuilder<MVMap<K,V>,K,V>
Returns:
the map