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

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

@NotThreadSafe
public static final class ListValue.Builder
extends Object

Builder class for a ListValue


Method Summary
 ListValue.Builder add(Object first, Object... other)
          Add a series of elements to this list
<T> ListValue.Builder
addAll(Iterable<T> iterable)
          Add elements from an iterable (list, set, other)
 VariableValue build()
          Build the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public ListValue.Builder add(Object first,
                             Object... other)
Add a series of elements to this list

Parameters:
first - first element
other - other elements, if any
Returns:
this
Throws:
NullPointerException - one argument at least is null

addAll

public <T> ListValue.Builder addAll(Iterable<T> iterable)
Add elements from an iterable (list, set, other)

Type Parameters:
T - type of elements in the iterable
Parameters:
iterable - the iterable
Returns:
this
Throws:
NullPointerException - the iterable is null, or one of its elements is null

build

public VariableValue build()
Build the value

Returns:
the list value as a VariableValue