Package pl.poznan.put.structure.formats
Class ImmutableTerminalMissing.Builder
- java.lang.Object
-
- pl.poznan.put.structure.formats.ImmutableTerminalMissing.Builder
-
- Enclosing class:
- ImmutableTerminalMissing
@NotThreadSafe public static final class ImmutableTerminalMissing.Builder extends Object
Builds instances of typeImmutableTerminalMissing. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTerminalMissing.BuilderaddAllSymbols(Iterable<? extends DotBracketSymbol> elements)Adds elements tosymbolslist.ImmutableTerminalMissing.BuilderaddSymbols(DotBracketSymbol element)Adds one element tosymbolslist.ImmutableTerminalMissing.BuilderaddSymbols(DotBracketSymbol... elements)Adds elements tosymbolslist.ImmutableTerminalMissingbuild()Builds a newImmutableTerminalMissing.ImmutableTerminalMissing.Builderfrom(TerminalMissing instance)Fill a builder with attribute values from the providedTerminalMissinginstance.ImmutableTerminalMissing.Buildersymbols(Iterable<? extends DotBracketSymbol> elements)Sets or replaces all elements forsymbolslist.
-
-
-
Method Detail
-
from
public final ImmutableTerminalMissing.Builder from(TerminalMissing instance)
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
public final ImmutableTerminalMissing.Builder addSymbols(DotBracketSymbol element)
Adds one element tosymbolslist.- Parameters:
element- A symbols element- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
public final ImmutableTerminalMissing.Builder addSymbols(DotBracketSymbol... elements)
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
public ImmutableTerminalMissing build()
Builds a newImmutableTerminalMissing.- Returns:
- An immutable instance of TerminalMissing
- Throws:
IllegalStateException- if any required attributes are missing
-
-