Package pl.poznan.put.structure.formats
Class ImmutableTerminalMissing.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableTerminalMissing.Builder
- Enclosing class:
- ImmutableTerminalMissing
Builds instances of type
ImmutableTerminalMissing
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllSymbols
(Iterable<? extends DotBracketSymbol> elements) Adds elements tosymbols
list.addSymbols
(DotBracketSymbol element) Adds one element tosymbols
list.addSymbols
(DotBracketSymbol... elements) Adds elements tosymbols
list.build()
Builds a newImmutableTerminalMissing
.from
(TerminalMissing instance) Fill a builder with attribute values from the providedTerminalMissing
instance.symbols
(Iterable<? extends DotBracketSymbol> elements) Sets or replaces all elements forsymbols
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedTerminalMissing
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addSymbols
Adds one element tosymbols
list.- Parameters:
element
- A symbols element- Returns:
this
builder for use in a chained invocation
-
addSymbols
Adds elements tosymbols
list.- Parameters:
elements
- An array of symbols elements- Returns:
this
builder for use in a chained invocation
-
symbols
public final ImmutableTerminalMissing.Builder symbols(Iterable<? extends DotBracketSymbol> elements) Sets or replaces all elements forsymbols
list.- Parameters:
elements
- An iterable of symbols elements- Returns:
this
builder for use in a chained invocation
-
addAllSymbols
public final ImmutableTerminalMissing.Builder addAllSymbols(Iterable<? extends DotBracketSymbol> elements) Adds elements tosymbols
list.- Parameters:
elements
- An iterable of symbols elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableTerminalMissing
.- Returns:
- An immutable instance of TerminalMissing
- Throws:
IllegalStateException
- if any required attributes are missing
-