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
-
Method Summary
Modifier and TypeMethodDescriptionAddselement
to theImmutableNullableList
.Adds each element ofelements
to theImmutableNullableList
.Adds each element ofelements
to theImmutableNullableList
.Adds each element ofelements
to theImmutableNullableList
.build()
Returns a newly-createdImmutableNullableList
based 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
Addselement
to theImmutableNullableList
.- Parameters:
element
- the element to add- Returns:
- this
Builder
object
-
addAll
Adds each element ofelements
to theImmutableNullableList
.- Parameters:
elements
- theIterable
to add to theImmutableNullableList
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
add
Adds each element ofelements
to theImmutableNullableList
.- Parameters:
elements
- the elements to add to theImmutableNullableList
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
addAll
Adds each element ofelements
to theImmutableNullableList
.- Parameters:
elements
- the elements to add to theImmutableNullableList
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
build
Returns a newly-createdImmutableNullableList
based on the contents of theBuilder
.
-