Package pl.poznan.put.pdb
Class ImmutablePdbResidueIdentifier
- java.lang.Object
-
- pl.poznan.put.pdb.PdbResidueIdentifier
-
- pl.poznan.put.pdb.ImmutablePdbResidueIdentifier
-
- All Implemented Interfaces:
Serializable,Comparable<ChainNumberICode>,ChainNumberICode
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutablePdbResidueIdentifier extends PdbResidueIdentifier
Immutable implementation ofPdbResidueIdentifier.Use the builder to create immutable instances:
ImmutablePdbResidueIdentifier.builder(). Use the static factory method to create immutable instances:ImmutablePdbResidueIdentifier.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePdbResidueIdentifier.BuilderBuilds instances of typeImmutablePdbResidueIdentifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePdbResidueIdentifier.Builderbuilder()Creates a builder forImmutablePdbResidueIdentifier.StringchainIdentifier()static ImmutablePdbResidueIdentifiercopyOf(PdbResidueIdentifier instance)Creates an immutable copy of aPdbResidueIdentifiervalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePdbResidueIdentifierthat have equal attribute values.inthashCode()Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode.StringinsertionCode()static ImmutablePdbResidueIdentifierof(String chainIdentifier, int residueNumber, String insertionCode)Construct a new immutablePdbResidueIdentifierinstance.intresidueNumber()ImmutablePdbResidueIdentifierwithChainIdentifier(String value)Copy the current immutable object by setting a value for thechainIdentifierattribute.ImmutablePdbResidueIdentifierwithInsertionCode(String value)Copy the current immutable object by setting a value for theinsertionCodeattribute.ImmutablePdbResidueIdentifierwithResidueNumber(int value)Copy the current immutable object by setting a value for theresidueNumberattribute.-
Methods inherited from class pl.poznan.put.pdb.PdbResidueIdentifier
from, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareTo
-
-
-
-
Method Detail
-
chainIdentifier
public String chainIdentifier()
- Specified by:
chainIdentifierin interfaceChainNumberICode- Specified by:
chainIdentifierin classPdbResidueIdentifier- Returns:
- The value of the
chainIdentifierattribute
-
residueNumber
public int residueNumber()
- Specified by:
residueNumberin interfaceChainNumberICode- Specified by:
residueNumberin classPdbResidueIdentifier- Returns:
- The value of the
residueNumberattribute
-
insertionCode
public String insertionCode()
- Specified by:
insertionCodein interfaceChainNumberICode- Specified by:
insertionCodein classPdbResidueIdentifier- Returns:
- The value of the
insertionCodeattribute
-
withChainIdentifier
public final ImmutablePdbResidueIdentifier withChainIdentifier(String value)
Copy the current immutable object by setting a value for thechainIdentifierattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for chainIdentifier- Returns:
- A modified copy of the
thisobject
-
withResidueNumber
public final ImmutablePdbResidueIdentifier withResidueNumber(int value)
Copy the current immutable object by setting a value for theresidueNumberattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for residueNumber- Returns:
- A modified copy of the
thisobject
-
withInsertionCode
public final ImmutablePdbResidueIdentifier withInsertionCode(String value)
Copy the current immutable object by setting a value for theinsertionCodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for insertionCode- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutablePdbResidueIdentifierthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode.
-
of
public static ImmutablePdbResidueIdentifier of(String chainIdentifier, int residueNumber, String insertionCode)
Construct a new immutablePdbResidueIdentifierinstance.- Parameters:
chainIdentifier- The value for thechainIdentifierattributeresidueNumber- The value for theresidueNumberattributeinsertionCode- The value for theinsertionCodeattribute- Returns:
- An immutable PdbResidueIdentifier instance
-
copyOf
public static ImmutablePdbResidueIdentifier copyOf(PdbResidueIdentifier instance)
Creates an immutable copy of aPdbResidueIdentifiervalue. 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 PdbResidueIdentifier instance
-
builder
public static ImmutablePdbResidueIdentifier.Builder builder()
Creates a builder forImmutablePdbResidueIdentifier.ImmutablePdbResidueIdentifier.builder() .chainIdentifier(String) // requiredchainIdentifier.residueNumber(int) // requiredresidueNumber.insertionCode(String) // requiredinsertionCode.build();- Returns:
- A new ImmutablePdbResidueIdentifier builder
-
-