Package org.h2.mvstore

# Class MVMap.Builder<K,V>

java.lang.Object
org.h2.mvstore.MVMap.BasicBuilder<MVMap<K,V>,K,V>
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>`

Direct Known Subclasses:
  `SequenceMap.Builder`

Enclosing class:
  `MVMap<K,V>`

public static class MVMap.Builder<K,V> extends MVMap.BasicBuilder<MVMap<K,V>,K,V>
A builder for this class.

## Constructor Summary

Constructors
Constructor
Description
`Builder()`

## Method Summary

Modifier and Type
Method
Description
`protected MVMap<K,V>`
`create(Map<String,Object> config)`
Create map from config.
`MVMap.Builder<K,V>`
`keyType(DataType<? super K> dataType)`
Set the key data type.
`MVMap.Builder<K,V>`
`singleWriter()`
Set up this Builder to produce MVMap, which can be used in append mode by a single thread.
`MVMap.Builder<K,V>`
`valueType(DataType<? super V> dataType)`
Set the value data type.

### Methods inherited from class org.h2.mvstore.MVMap.BasicBuilder

`create, getKeyType, getValueType, setKeyType, setValueType`

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

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

## Constructor Details

### Builder

public Builder()

## Method Details

### keyType

public MVMap.Builder<K,V> keyType(DataType<? super K> dataType)
Description copied from class: `MVMap.BasicBuilder`
Set the key data type.

Overrides:
  `keyType` in class `MVMap.BasicBuilder<MVMap<K,V>,K,V>`
Parameters:
  `dataType` - the key type
Returns:
  this

### valueType

public MVMap.Builder<K,V> valueType(DataType<? super V> dataType)
Description copied from class: `MVMap.BasicBuilder`
Set the value data type.

Overrides:
  `valueType` in class `MVMap.BasicBuilder<MVMap<K,V>,K,V>`
Parameters:
  `dataType` - the value type
Returns:
  this

### singleWriter

public MVMap.Builder<K,V> singleWriter()
Set up this Builder to produce MVMap, which can be used in append mode by a single thread.

Returns:
  this Builder for chained execution
See Also:
  - `MVMap.append(Object, Object)`

### create

protected MVMap<K,V> create(Map<String,Object> config)
Description copied from class: `MVMap.BasicBuilder`
Create map from config.

Specified by:
  `create` in class `MVMap.BasicBuilder<MVMap<K,V>,K,V>`
Parameters:
  `config` - config map
Returns:
  new map