Package pl.poznan.put.pdb.analysis
Class ImmutablePdbChain
java.lang.Object
pl.poznan.put.pdb.analysis.PdbChain
pl.poznan.put.pdb.analysis.ImmutablePdbChain
- All Implemented Interfaces:
Serializable,Comparable<PdbChain>,ResidueCollection,SingleTypedResidueCollection
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutablePdbChain
extends PdbChain
Immutable implementation of
PdbChain.
Use the builder to create immutable instances:
ImmutablePdbChain.builder().
Use the static factory method to create immutable instances:
ImmutablePdbChain.of().
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
ResidueCollection.CifBuilder, ResidueCollection.PdbBuilder -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutablePdbChain.Builderbuilder()Creates a builder forImmutablePdbChain.static ImmutablePdbChainCreates an immutable copy of aPdbChainvalue.booleanThis instance is equal to all instances ofImmutablePdbChainthat have equal attribute values.inthashCode()Computes a hash code from attributes:identifier,residues.static ImmutablePdbChainof(String identifier, Iterable<? extends PdbResidue> residues) Construct a new immutablePdbChaininstance.static ImmutablePdbChainof(String identifier, List<PdbResidue> residues) Construct a new immutablePdbChaininstance.residues()toString()Prints the immutable valuePdbChainwith attribute values.final ImmutablePdbChainwithIdentifier(String value) Copy the current immutable object by setting a value for theidentifierattribute.final ImmutablePdbChainwithResidues(Iterable<? extends PdbResidue> elements) Copy the current immutable object with elements that replace the content ofresidues.final ImmutablePdbChainwithResidues(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, waitMethods inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
filteredAtoms, findBondLengthViolations, findResidue, hasResidue, indexOf, namedResidueIdentifiers, residueIdentifiers, sequence, toCif, toPdb, withoutAlternateLocationsMethods inherited from interface pl.poznan.put.pdb.analysis.SingleTypedResidueCollection
moleculeType
-
Method Details
-
identifier
- Specified by:
identifierin classPdbChain- Returns:
- The chain identifier.
-
residues
- Specified by:
residuesin interfaceResidueCollection- Specified by:
residuesin classPdbChain- Returns:
- The value of the
residuesattribute
-
withIdentifier
Copy the current immutable object by setting a value for theidentifierattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for identifier- Returns:
- A modified copy of the
thisobject
-
withResidues
Copy the current immutable object with elements that replace the content ofresidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withResidues
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
thisobject
-
equals
This instance is equal to all instances ofImmutablePdbChainthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:identifier,residues. -
toString
Prints the immutable valuePdbChainwith attribute values. -
of
Construct a new immutablePdbChaininstance.- Parameters:
identifier- The value for theidentifierattributeresidues- The value for theresiduesattribute- Returns:
- An immutable PdbChain instance
-
of
Construct a new immutablePdbChaininstance.- Parameters:
identifier- The value for theidentifierattributeresidues- The value for theresiduesattribute- Returns:
- An immutable PdbChain instance
-
copyOf
Creates an immutable copy of aPdbChainvalue. 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 PdbChain instance
-
builder
Creates a builder forImmutablePdbChain.ImmutablePdbChain.builder() .identifier(String) // requiredidentifier.addResidues|addAllResidues(pl.poznan.put.pdb.analysis.PdbResidue) //residueselements .build();- Returns:
- A new ImmutablePdbChain builder
-