Package org.apache.calcite.util
Class ImmutableNullableList.Builder<E>
java.lang.Object
org.apache.calcite.util.ImmutableNullableList.Builder<E>
- Type Parameters:
E- element type
- Enclosing class:
ImmutableNullableList<E>
A builder for creating immutable nullable list instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAddselementto theImmutableNullableList.Adds each element ofelementsto theImmutableNullableList.Adds each element ofelementsto theImmutableNullableList.Adds each element ofelementsto theImmutableNullableList.build()Returns a newly-createdImmutableNullableListbased on the contents of theBuilder.
-
Constructor Details
-
Builder
public Builder()Creates a new builder. The returned builder is equivalent to the builder generated byImmutableNullableList.builder().
-
-
Method Details
-
add
Addselementto theImmutableNullableList.- Parameters:
element- the element to add- Returns:
- this
Builderobject
-
addAll
Adds each element ofelementsto theImmutableNullableList.- Parameters:
elements- theIterableto add to theImmutableNullableList- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null
-
add
Adds each element ofelementsto theImmutableNullableList.- Parameters:
elements- the elements to add to theImmutableNullableList- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null
-
addAll
Adds each element ofelementsto theImmutableNullableList.- Parameters:
elements- the elements to add to theImmutableNullableList- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null
-
build
Returns a newly-createdImmutableNullableListbased on the contents of theBuilder.
-