com.github.fge.uritemplate.vars.values
Class MapValue.Builder

java.lang.Object
  extended by com.github.fge.uritemplate.vars.values.MapValue.Builder
Enclosing class:
MapValue

@NotThreadSafe
public static final class MapValue.Builder
extends Object

Builder class for a MapValue


Method Summary
 VariableValue build()
          Build the value
<T> MapValue.Builder
put(String key, T value)
          Add one key/value pair to the map
<T> MapValue.Builder
putAll(Map<String,T> map)
          Inject a map of key/value pairs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

put

public <T> MapValue.Builder put(String key,
                                T value)
Add one key/value pair to the map

Type Parameters:
T - the type of the value
Parameters:
key - the key
value - the value
Returns:
this
Throws:
NullPointerException - the key or value is null

putAll

public <T> MapValue.Builder putAll(Map<String,T> map)
Inject a map of key/value pairs

Type Parameters:
T - the type of this map's values
Parameters:
map - the map
Returns:
this
Throws:
NullPointerException - map is null, or one of its keys or values is null

build

public VariableValue build()
Build the value

Returns:
the map value as a VariableValue