Package pl.poznan.put.torsion
Class ImmutableAtomBasedTorsionAngleType
- java.lang.Object
-
- pl.poznan.put.torsion.ImmutableAtomBasedTorsionAngleType
-
- All Implemented Interfaces:
DisplayableExportable,AtomBasedTorsionAngleType,TorsionAngleType
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableAtomBasedTorsionAngleType extends Object implements AtomBasedTorsionAngleType
Immutable implementation ofAtomBasedTorsionAngleType.Use the builder to create immutable instances:
ImmutableAtomBasedTorsionAngleType.builder(). Use the static factory method to create immutable instances:ImmutableAtomBasedTorsionAngleType.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAtomBasedTorsionAngleType.BuilderBuilds instances of typeImmutableAtomBasedTorsionAngleType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Quadruple<AtomName>atoms()static ImmutableAtomBasedTorsionAngleType.Builderbuilder()Creates a builder forImmutableAtomBasedTorsionAngleType.static ImmutableAtomBasedTorsionAngleTypecopyOf(AtomBasedTorsionAngleType instance)Creates an immutable copy of aAtomBasedTorsionAngleTypevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableAtomBasedTorsionAngleTypethat have equal attribute values.StringexportName()inthashCode()Computes a hash code from attributes:moleculeType,shortDisplayName,exportName,atoms,residueRule,isPseudoTorsion.booleanisPseudoTorsion()MoleculeTypemoleculeType()static ImmutableAtomBasedTorsionAngleTypeof(MoleculeType moleculeType, String shortDisplayName, String exportName, Quadruple<AtomName> atoms, Quadruple<Integer> residueRule)Construct a new immutableAtomBasedTorsionAngleTypeinstance.Quadruple<Integer>residueRule()StringshortDisplayName()StringtoString()Prints the immutable valueAtomBasedTorsionAngleTypewith attribute values.ImmutableAtomBasedTorsionAngleTypewithAtoms(Quadruple<AtomName> value)Copy the current immutable object by setting a value for theatomsattribute.ImmutableAtomBasedTorsionAngleTypewithExportName(String value)Copy the current immutable object by setting a value for theexportNameattribute.ImmutableAtomBasedTorsionAngleTypewithIsPseudoTorsion(boolean value)Copy the current immutable object by setting a value for theisPseudoTorsionattribute.ImmutableAtomBasedTorsionAngleTypewithMoleculeType(MoleculeType value)Copy the current immutable object by setting a value for themoleculeTypeattribute.ImmutableAtomBasedTorsionAngleTypewithResidueRule(Quadruple<Integer> value)Copy the current immutable object by setting a value for theresidueRuleattribute.ImmutableAtomBasedTorsionAngleTypewithShortDisplayName(String value)Copy the current immutable object by setting a value for theshortDisplayNameattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pl.poznan.put.torsion.AtomBasedTorsionAngleType
calculate, calculate, findAtomPairs, longDisplayName
-
-
-
-
Method Detail
-
moleculeType
public MoleculeType moleculeType()
- Specified by:
moleculeTypein interfaceAtomBasedTorsionAngleType- Specified by:
moleculeTypein interfaceTorsionAngleType- Returns:
- The value of the
moleculeTypeattribute
-
shortDisplayName
public String shortDisplayName()
- Specified by:
shortDisplayNamein interfaceAtomBasedTorsionAngleType- Specified by:
shortDisplayNamein interfaceDisplayableExportable- Returns:
- The value of the
shortDisplayNameattribute
-
exportName
public String exportName()
- Specified by:
exportNamein interfaceAtomBasedTorsionAngleType- Specified by:
exportNamein interfaceDisplayableExportable- Returns:
- The value of the
exportNameattribute
-
atoms
public Quadruple<AtomName> atoms()
- Specified by:
atomsin interfaceAtomBasedTorsionAngleType- Returns:
- The quadruple of atoms defining this torsion angle type.
-
residueRule
public Quadruple<Integer> residueRule()
- Specified by:
residueRulein interfaceAtomBasedTorsionAngleType- Returns:
- The quadruple of relative indices to take atoms from. For example, a rule (0, 0, 0, 0) means that all atoms are from the same residue, while a rule (-1, 0, 0, 0) means that the first atom is taken from the preceding residue.
-
isPseudoTorsion
public boolean isPseudoTorsion()
- Specified by:
isPseudoTorsionin interfaceAtomBasedTorsionAngleType- Returns:
- True if this is an instance of a pseudo-torsion angle type. A pseudo-torsion angle type
is defined on a quadruple of atoms which are not connected (See
NucleotideTorsionAngle.ETAorAminoAcidTorsionAngle.CALPHA).
-
withMoleculeType
public final ImmutableAtomBasedTorsionAngleType withMoleculeType(MoleculeType value)
Copy the current immutable object by setting a value for themoleculeTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for moleculeType- Returns:
- A modified copy of the
thisobject
-
withShortDisplayName
public final ImmutableAtomBasedTorsionAngleType withShortDisplayName(String value)
Copy the current immutable object by setting a value for theshortDisplayNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for shortDisplayName- Returns:
- A modified copy of the
thisobject
-
withExportName
public final ImmutableAtomBasedTorsionAngleType withExportName(String value)
Copy the current immutable object by setting a value for theexportNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for exportName- Returns:
- A modified copy of the
thisobject
-
withAtoms
public final ImmutableAtomBasedTorsionAngleType withAtoms(Quadruple<AtomName> value)
Copy the current immutable object by setting a value for theatomsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for atoms- Returns:
- A modified copy of the
thisobject
-
withResidueRule
public final ImmutableAtomBasedTorsionAngleType withResidueRule(Quadruple<Integer> value)
Copy the current immutable object by setting a value for theresidueRuleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for residueRule- Returns:
- A modified copy of the
thisobject
-
withIsPseudoTorsion
public final ImmutableAtomBasedTorsionAngleType withIsPseudoTorsion(boolean value)
Copy the current immutable object by setting a value for theisPseudoTorsionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isPseudoTorsion- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableAtomBasedTorsionAngleTypethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:moleculeType,shortDisplayName,exportName,atoms,residueRule,isPseudoTorsion.
-
toString
public String toString()
Prints the immutable valueAtomBasedTorsionAngleTypewith attribute values.
-
of
public static ImmutableAtomBasedTorsionAngleType of(MoleculeType moleculeType, String shortDisplayName, String exportName, Quadruple<AtomName> atoms, Quadruple<Integer> residueRule)
Construct a new immutableAtomBasedTorsionAngleTypeinstance.- Parameters:
moleculeType- The value for themoleculeTypeattributeshortDisplayName- The value for theshortDisplayNameattributeexportName- The value for theexportNameattributeatoms- The value for theatomsattributeresidueRule- The value for theresidueRuleattribute- Returns:
- An immutable AtomBasedTorsionAngleType instance
-
copyOf
public static ImmutableAtomBasedTorsionAngleType copyOf(AtomBasedTorsionAngleType instance)
Creates an immutable copy of aAtomBasedTorsionAngleTypevalue. 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 AtomBasedTorsionAngleType instance
-
builder
public static ImmutableAtomBasedTorsionAngleType.Builder builder()
Creates a builder forImmutableAtomBasedTorsionAngleType.ImmutableAtomBasedTorsionAngleType.builder() .moleculeType(pl.poznan.put.pdb.analysis.MoleculeType) // requiredmoleculeType.shortDisplayName(String) // requiredshortDisplayName.exportName(String) // requiredexportName.atoms(pl.poznan.put.types.Quadruple<pl.poznan.put.atom.AtomName>) // requiredatoms.residueRule(pl.poznan.put.types.Quadruple<Integer>) // requiredresidueRule.isPseudoTorsion(boolean) // optionalisPseudoTorsion.build();- Returns:
- A new ImmutableAtomBasedTorsionAngleType builder
-
-