Class ImmutablePdbCompactFragment
- All Implemented Interfaces:
Serializable
,ResidueCollection
,SingleTypedResidueCollection
PdbCompactFragment
.
Use the builder to create immutable instances:
ImmutablePdbCompactFragment.builder()
.
Use the static factory method to create immutable instances:
ImmutablePdbCompactFragment.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutablePdbCompactFragment
.Nested classes/interfaces inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
ResidueCollection.CifBuilder, ResidueCollection.PdbBuilder
-
Method Summary
Modifier and TypeMethodDescriptionprotected Set<TorsionAngleType>
protected List<ResidueTorsionAngles>
builder()
Creates a builder forImmutablePdbCompactFragment
.static ImmutablePdbCompactFragment
copyOf
(PdbCompactFragment instance) Creates an immutable copy of aPdbCompactFragment
value.boolean
This instance is equal to all instances ofImmutablePdbCompactFragment
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:residues
,name
.name()
static ImmutablePdbCompactFragment
of
(Iterable<? extends PdbResidue> residues) Construct a new immutablePdbCompactFragment
instance.static ImmutablePdbCompactFragment
of
(List<PdbResidue> residues) Construct a new immutablePdbCompactFragment
instance.residues()
Copy the current immutable object by setting a value for thename
attribute.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 pl.poznan.put.pdb.analysis.PdbCompactFragment
shifted, torsionAngles, toString
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
-
residues
- Specified by:
residues
in interfaceResidueCollection
- Specified by:
residues
in classPdbCompactFragment
- Returns:
- The value of the
residues
attribute
-
name
- Overrides:
name
in classPdbCompactFragment
- Returns:
- The name of this compact fragment.
-
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
-
withName
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutablePdbCompactFragment
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:residues
,name
. -
angleTypes
Returns a lazily initialized value of the
angleTypes
attribute. 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:
angleTypes
in classPdbCompactFragment
- Returns:
- A lazily initialized value of the
angleTypes
attribute
-
angleValues
Returns a lazily initialized value of the
angleValues
attribute. 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:
angleValues
in classPdbCompactFragment
- Returns:
- A lazily initialized value of the
angleValues
attribute
-
of
Construct a new immutablePdbCompactFragment
instance.- Parameters:
residues
- The value for theresidues
attribute- Returns:
- An immutable PdbCompactFragment instance
-
of
Construct a new immutablePdbCompactFragment
instance.- Parameters:
residues
- The value for theresidues
attribute- Returns:
- An immutable PdbCompactFragment instance
-
copyOf
Creates an immutable copy of aPdbCompactFragment
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 PdbCompactFragment instance
-
builder
Creates a builder forImmutablePdbCompactFragment
.ImmutablePdbCompactFragment.builder() .addResidues|addAllResidues(pl.poznan.put.pdb.analysis.PdbResidue) //
residues
elements .name(String) // optionalname
.build();- Returns:
- A new ImmutablePdbCompactFragment builder
-