Class ImmutablePdbCompactFragment
- java.lang.Object
-
- pl.poznan.put.pdb.analysis.PdbCompactFragment
-
- pl.poznan.put.pdb.analysis.ImmutablePdbCompactFragment
-
- All Implemented Interfaces:
Serializable,ResidueCollection,SingleTypedResidueCollection
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutablePdbCompactFragment extends PdbCompactFragment
Immutable implementation ofPdbCompactFragment.Use the builder to create immutable instances:
ImmutablePdbCompactFragment.builder(). Use the static factory method to create immutable instances:ImmutablePdbCompactFragment.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePdbCompactFragment.BuilderBuilds instances of typeImmutablePdbCompactFragment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<TorsionAngleType>angleTypes()protected List<ResidueTorsionAngles>angleValues()static ImmutablePdbCompactFragment.Builderbuilder()Creates a builder forImmutablePdbCompactFragment.static ImmutablePdbCompactFragmentcopyOf(PdbCompactFragment instance)Creates an immutable copy of aPdbCompactFragmentvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePdbCompactFragmentthat have equal attribute values.inthashCode()Computes a hash code from attributes:residues,name.Stringname()static ImmutablePdbCompactFragmentof(Iterable<? extends PdbResidue> residues)Construct a new immutablePdbCompactFragmentinstance.static ImmutablePdbCompactFragmentof(List<PdbResidue> residues)Construct a new immutablePdbCompactFragmentinstance.List<PdbResidue>residues()ImmutablePdbCompactFragmentwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutablePdbCompactFragmentwithResidues(Iterable<? extends PdbResidue> elements)Copy the current immutable object with elements that replace the content ofresidues.ImmutablePdbCompactFragmentwithResidues(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 Detail
-
residues
public List<PdbResidue> residues()
- Specified by:
residuesin interfaceResidueCollection- Specified by:
residuesin classPdbCompactFragment- Returns:
- The value of the
residuesattribute
-
name
public String name()
- Overrides:
namein classPdbCompactFragment- Returns:
- The name of this compact fragment.
-
withResidues
public final ImmutablePdbCompactFragment withResidues(PdbResidue... elements)
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
public final ImmutablePdbCompactFragment 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
thisobject
-
withName
public final ImmutablePdbCompactFragment withName(String value)
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
public boolean equals(@Nullable Object another)
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
protected Set<TorsionAngleType> 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
protected List<ResidueTorsionAngles> 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
public static ImmutablePdbCompactFragment of(List<PdbResidue> residues)
Construct a new immutablePdbCompactFragmentinstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable PdbCompactFragment instance
-
of
public static ImmutablePdbCompactFragment of(Iterable<? extends PdbResidue> residues)
Construct a new immutablePdbCompactFragmentinstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable PdbCompactFragment instance
-
copyOf
public static ImmutablePdbCompactFragment copyOf(PdbCompactFragment instance)
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
public static ImmutablePdbCompactFragment.Builder 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
-
-