Package pl.poznan.put.external.dssr
Class ImmutableDssrJson.Builder
java.lang.Object
pl.poznan.put.external.dssr.ImmutableDssrJson.Builder
- Enclosing class:
- ImmutableDssrJson
Builds instances of type
ImmutableDssrJson.
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 TypeMethodDescriptionaddAllNucleotides(Iterable<? extends Nucleotide> elements) Adds elements tonucleotideslist.addAllPairs(Iterable<? extends Pair> elements) Adds elements topairslist.addNucleotides(Nucleotide element) Adds one element tonucleotideslist.addNucleotides(Nucleotide... elements) Adds elements tonucleotideslist.Adds one element topairslist.Adds elements topairslist.build()Builds a newImmutableDssrJson.Fill a builder with attribute values from the providedDssrJsoninstance.nucleotides(Iterable<? extends Nucleotide> elements) Sets or replaces all elements fornucleotideslist.Sets or replaces all elements forpairslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedDssrJsoninstance. 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
-
addPairs
Adds one element topairslist.- Parameters:
element- A pairs element- Returns:
thisbuilder for use in a chained invocation
-
addPairs
Adds elements topairslist.- Parameters:
elements- An array of pairs elements- Returns:
thisbuilder for use in a chained invocation
-
pairs
Sets or replaces all elements forpairslist.- Parameters:
elements- An iterable of pairs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPairs
Adds elements topairslist.- Parameters:
elements- An iterable of pairs elements- Returns:
thisbuilder for use in a chained invocation
-
addNucleotides
Adds one element tonucleotideslist.- Parameters:
element- A nucleotides element- Returns:
thisbuilder for use in a chained invocation
-
addNucleotides
Adds elements tonucleotideslist.- Parameters:
elements- An array of nucleotides elements- Returns:
thisbuilder for use in a chained invocation
-
nucleotides
Sets or replaces all elements fornucleotideslist.- Parameters:
elements- An iterable of nucleotides elements- Returns:
thisbuilder for use in a chained invocation
-
addAllNucleotides
Adds elements tonucleotideslist.- Parameters:
elements- An iterable of nucleotides elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDssrJson.- Returns:
- An immutable instance of DssrJson
- Throws:
IllegalStateException- if any required attributes are missing
-