Package org.apache.calcite.util
Class ImmutableNullableSet.Builder<E>
java.lang.Object
org.apache.calcite.util.ImmutableNullableSet.Builder<E>
- Type Parameters:
E
- element type
- Enclosing class:
ImmutableNullableSet<E>
A builder for creating immutable nullable set instances.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAddselement
to theImmutableNullableSet
.Adds each element ofelements
to theImmutableNullableSet
.Adds each element ofelements
to theImmutableNullableSet
.Adds each element ofelements
to theImmutableNullableSet
.build()
Returns a newly-createdImmutableNullableSet
based on the contents of theBuilder
.
-
Constructor Details
-
Builder
public Builder()Creates a new builder. The returned builder is equivalent to the builder generated byImmutableNullableSet.builder()
.
-
-
Method Details
-
add
Addselement
to theImmutableNullableSet
.- Parameters:
element
- the element to add- Returns:
- this
Builder
object
-
addAll
Adds each element ofelements
to theImmutableNullableSet
.- Parameters:
elements
- theIterable
to add to theImmutableNullableSet
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
add
Adds each element ofelements
to theImmutableNullableSet
.- Parameters:
elements
- the elements to add to theImmutableNullableSet
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
addAll
Adds each element ofelements
to theImmutableNullableSet
.- Parameters:
elements
- the elements to add to theImmutableNullableSet
- Returns:
- this
Builder
object - Throws:
NullPointerException
- ifelements
is null
-
build
Returns a newly-createdImmutableNullableSet
based on the contents of theBuilder
.
-