Package pl.poznan.put.pdb.analysis
Class ImmutableDefaultResidueCollection
java.lang.Object
pl.poznan.put.pdb.analysis.DefaultResidueCollection
pl.poznan.put.pdb.analysis.ImmutableDefaultResidueCollection
- All Implemented Interfaces:
Serializable
,ResidueCollection
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableDefaultResidueCollection
extends DefaultResidueCollection
Immutable implementation of
DefaultResidueCollection
.
Use the builder to create immutable instances:
ImmutableDefaultResidueCollection.builder()
.
Use the static factory method to create immutable instances:
ImmutableDefaultResidueCollection.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDefaultResidueCollection
.Nested classes/interfaces inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
ResidueCollection.CifBuilder, ResidueCollection.PdbBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableDefaultResidueCollection
.copyOf
(DefaultResidueCollection instance) Creates an immutable copy of aDefaultResidueCollection
value.boolean
This instance is equal to all instances ofImmutableDefaultResidueCollection
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:residues
.of
(Iterable<? extends PdbResidue> residues) Construct a new immutableDefaultResidueCollection
instance.of
(List<PdbResidue> residues) Construct a new immutableDefaultResidueCollection
instance.residues()
toString()
Prints the immutable valueDefaultResidueCollection
with attribute values.withResidues
(Iterable<? extends PdbResidue> elements) Copy the current immutable object with elements that replace the content ofresidues
.withResidues
(PdbResidue... elements) Copy the current immutable object with elements that replace the content ofresidues
.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
filteredAtoms, findBondLengthViolations, findResidue, hasResidue, indexOf, namedResidueIdentifiers, residueIdentifiers, sequence, toCif, toPdb, withoutAlternateLocations
-
Method Details
-
residues
- Specified by:
residues
in interfaceResidueCollection
- Specified by:
residues
in classDefaultResidueCollection
- Returns:
- The value of the
residues
attribute
-
withResidues
Copy the current immutable object with elements that replace the content ofresidues
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withResidues
public final ImmutableDefaultResidueCollection withResidues(Iterable<? extends PdbResidue> elements) Copy the current immutable object with elements that replace the content ofresidues
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of residues elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableDefaultResidueCollection
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:residues
. -
toString
Prints the immutable valueDefaultResidueCollection
with attribute values. -
of
Construct a new immutableDefaultResidueCollection
instance.- Parameters:
residues
- The value for theresidues
attribute- Returns:
- An immutable DefaultResidueCollection instance
-
of
Construct a new immutableDefaultResidueCollection
instance.- Parameters:
residues
- The value for theresidues
attribute- Returns:
- An immutable DefaultResidueCollection instance
-
copyOf
Creates an immutable copy of aDefaultResidueCollection
value. 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 DefaultResidueCollection instance
-
builder
Creates a builder forImmutableDefaultResidueCollection
.ImmutableDefaultResidueCollection.builder() .addResidues|addAllResidues(pl.poznan.put.pdb.analysis.PdbResidue) //
residues
elements .build();- Returns:
- A new ImmutableDefaultResidueCollection builder
-