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 tosymbolslist.addSymbols(DotBracketSymbol element) Adds one element tosymbolslist.addSymbols(DotBracketSymbol... elements) Adds elements tosymbolslist.build()Builds a newImmutableTerminalMissing.from(TerminalMissing instance) Fill a builder with attribute values from the providedTerminalMissinginstance.symbols(Iterable<? extends DotBracketSymbol> elements) Sets or replaces all elements forsymbolslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedTerminalMissinginstance. 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:
thisbuilder for use in a chained invocation
-
addSymbols
Adds one element tosymbolslist.- Parameters:
element- A symbols element- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
Adds elements tosymbolslist.- Parameters:
elements- An array of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
symbols
public final ImmutableTerminalMissing.Builder symbols(Iterable<? extends DotBracketSymbol> elements) Sets or replaces all elements forsymbolslist.- Parameters:
elements- An iterable of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSymbols
public final ImmutableTerminalMissing.Builder addAllSymbols(Iterable<? extends DotBracketSymbol> elements) Adds elements tosymbolslist.- Parameters:
elements- An iterable of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTerminalMissing.- Returns:
- An immutable instance of TerminalMissing
- Throws:
IllegalStateException- if any required attributes are missing
-