Package pl.poznan.put.external.dssr
Class ImmutableDssrJson
java.lang.Object
pl.poznan.put.external.dssr.DssrJson
pl.poznan.put.external.dssr.ImmutableDssrJson
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableDssrJson
extends DssrJson
Immutable implementation of
DssrJson.
Use the builder to create immutable instances:
ImmutableDssrJson.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDssrJson.Builderbuilder()Creates a builder forImmutableDssrJson.static ImmutableDssrJsonCreates an immutable copy of aDssrJsonvalue.booleanThis instance is equal to all instances ofImmutableDssrJsonthat have equal attribute values.inthashCode()Computes a hash code from attributes:pairs,nucleotides.protected Map<String,Nucleotide> pairs()toString()Prints the immutable valueDssrJsonwith attribute values.final ImmutableDssrJsonwithNucleotides(Iterable<? extends Nucleotide> elements) Copy the current immutable object with elements that replace the content ofnucleotides.final ImmutableDssrJsonwithNucleotides(Nucleotide... elements) Copy the current immutable object with elements that replace the content ofnucleotides.final ImmutableDssrJsonCopy the current immutable object with elements that replace the content ofpairs.final ImmutableDssrJsonCopy the current immutable object with elements that replace the content ofpairs.Methods inherited from class pl.poznan.put.external.dssr.DssrJson
findNucleotide
-
Method Details
-
pairs
-
nucleotides
- Specified by:
nucleotidesin classDssrJson- Returns:
- The value of the
nucleotidesattribute
-
withPairs
Copy the current immutable object with elements that replace the content ofpairs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPairs
Copy the current immutable object with elements that replace the content ofpairs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of pairs elements to set- Returns:
- A modified copy of
thisobject
-
withNucleotides
Copy the current immutable object with elements that replace the content ofnucleotides.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNucleotides
Copy the current immutable object with elements that replace the content ofnucleotides. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nucleotides elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDssrJsonthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:pairs,nucleotides. -
toString
Prints the immutable valueDssrJsonwith attribute values. -
idNucleotideMap
Returns a lazily initialized value of the
idNucleotideMapattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
idNucleotideMapin classDssrJson- Returns:
- A lazily initialized value of the
idNucleotideMapattribute
-
copyOf
Creates an immutable copy of aDssrJsonvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DssrJson instance
-
builder
Creates a builder forImmutableDssrJson.ImmutableDssrJson.builder() .addPairs|addAllPairs(pl.poznan.put.external.dssr.Pair) //pairselements .addNucleotides|addAllNucleotides(pl.poznan.put.external.dssr.Nucleotide) //nucleotideselements .build();- Returns:
- A new ImmutableDssrJson builder
-