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.Builder
builder()
Creates a builder forImmutablePdbChain
.static ImmutablePdbChain
Creates an immutable copy of aPdbChain
value.boolean
This instance is equal to all instances ofImmutablePdbChain
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:identifier
,residues
.static ImmutablePdbChain
of
(String identifier, Iterable<? extends PdbResidue> residues) Construct a new immutablePdbChain
instance.static ImmutablePdbChain
of
(String identifier, List<PdbResidue> residues) Construct a new immutablePdbChain
instance.residues()
toString()
Prints the immutable valuePdbChain
with attribute values.final ImmutablePdbChain
withIdentifier
(String value) Copy the current immutable object by setting a value for theidentifier
attribute.final ImmutablePdbChain
withResidues
(Iterable<? extends PdbResidue> elements) Copy the current immutable object with elements that replace the content ofresidues
.final ImmutablePdbChain
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
Methods inherited from interface pl.poznan.put.pdb.analysis.SingleTypedResidueCollection
moleculeType
-
Method Details
-
identifier
- Specified by:
identifier
in classPdbChain
- Returns:
- The chain identifier.
-
residues
- Specified by:
residues
in interfaceResidueCollection
- Specified by:
residues
in classPdbChain
- Returns:
- The value of the
residues
attribute
-
withIdentifier
Copy the current immutable object by setting a value for theidentifier
attribute. 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
this
object
-
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
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 ofImmutablePdbChain
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:identifier
,residues
. -
toString
Prints the immutable valuePdbChain
with attribute values. -
of
Construct a new immutablePdbChain
instance.- Parameters:
identifier
- The value for theidentifier
attributeresidues
- The value for theresidues
attribute- Returns:
- An immutable PdbChain instance
-
of
Construct a new immutablePdbChain
instance.- Parameters:
identifier
- The value for theidentifier
attributeresidues
- The value for theresidues
attribute- Returns:
- An immutable PdbChain instance
-
copyOf
Creates an immutable copy of aPdbChain
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 PdbChain instance
-
builder
Creates a builder forImmutablePdbChain
.ImmutablePdbChain.builder() .identifier(String) // required
identifier
.addResidues|addAllResidues(pl.poznan.put.pdb.analysis.PdbResidue) //residues
elements .build();- Returns:
- A new ImmutablePdbChain builder
-