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 ofDssrJson.Use the builder to create immutable instances:
ImmutableDssrJson.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDssrJson.BuilderBuilds instances of typeImmutableDssrJson.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDssrJson.Builderbuilder()Creates a builder forImmutableDssrJson.static ImmutableDssrJsoncopyOf(DssrJson instance)Creates an immutable copy of aDssrJsonvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDssrJsonthat have equal attribute values.inthashCode()Computes a hash code from attributes:pairs,nucleotides.protected Map<String,Nucleotide>idNucleotideMap()List<Nucleotide>nucleotides()List<Pair>pairs()StringtoString()Prints the immutable valueDssrJsonwith attribute values.ImmutableDssrJsonwithNucleotides(Iterable<? extends Nucleotide> elements)Copy the current immutable object with elements that replace the content ofnucleotides.ImmutableDssrJsonwithNucleotides(Nucleotide... elements)Copy the current immutable object with elements that replace the content ofnucleotides.ImmutableDssrJsonwithPairs(Iterable<? extends Pair> elements)Copy the current immutable object with elements that replace the content ofpairs.ImmutableDssrJsonwithPairs(Pair... elements)Copy the current immutable object with elements that replace the content ofpairs.-
Methods inherited from class pl.poznan.put.external.dssr.DssrJson
findNucleotide
-
-
-
-
Method Detail
-
nucleotides
public List<Nucleotide> nucleotides()
- Specified by:
nucleotidesin classDssrJson- Returns:
- The value of the
nucleotidesattribute
-
withPairs
public final ImmutableDssrJson withPairs(Pair... elements)
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
public final ImmutableDssrJson withPairs(Iterable<? extends Pair> elements)
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
public final ImmutableDssrJson withNucleotides(Nucleotide... elements)
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
public final ImmutableDssrJson withNucleotides(Iterable<? extends Nucleotide> elements)
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
public boolean equals(@Nullable Object another)
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
public String toString()
Prints the immutable valueDssrJsonwith attribute values.
-
idNucleotideMap
protected Map<String,Nucleotide> 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
public static ImmutableDssrJson copyOf(DssrJson instance)
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
public static ImmutableDssrJson.Builder 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
-
-