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 classBuilds 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 ImmutablePdbCompactFragmentcopyOf(PdbCompactFragment instance) Creates an immutable copy of aPdbCompactFragmentvalue.booleanThis instance is equal to all instances ofImmutablePdbCompactFragmentthat have equal attribute values.inthashCode()Computes a hash code from attributes:residues,name.name()static ImmutablePdbCompactFragmentof(Iterable<? extends PdbResidue> residues) Construct a new immutablePdbCompactFragmentinstance.static ImmutablePdbCompactFragmentof(List<PdbResidue> residues) Construct a new immutablePdbCompactFragmentinstance.residues()Copy the current immutable object by setting a value for thenameattribute.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, toStringMethods 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
-
residues
- Specified by:
residuesin interfaceResidueCollection- Specified by:
residuesin classPdbCompactFragment- Returns:
- The value of the
residuesattribute
-
name
- Overrides:
namein 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
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
-
withName
Copy the current immutable object by setting a value for thenameattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutablePdbCompactFragmentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:residues,name. -
angleTypes
Returns a lazily initialized value of the
angleTypesattribute. 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:
angleTypesin classPdbCompactFragment- Returns:
- A lazily initialized value of the
angleTypesattribute
-
angleValues
Returns a lazily initialized value of the
angleValuesattribute. 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:
angleValuesin classPdbCompactFragment- Returns:
- A lazily initialized value of the
angleValuesattribute
-
of
Construct a new immutablePdbCompactFragmentinstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable PdbCompactFragment instance
-
of
Construct a new immutablePdbCompactFragmentinstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable PdbCompactFragment instance
-
copyOf
Creates an immutable copy of aPdbCompactFragmentvalue. 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) //residueselements .name(String) // optionalname.build();- Returns:
- A new ImmutablePdbCompactFragment builder
-