Package pl.poznan.put.pdb
Class ImmutablePdbNamedResidueIdentifier
- java.lang.Object
-
- pl.poznan.put.pdb.PdbNamedResidueIdentifier
-
- pl.poznan.put.pdb.ImmutablePdbNamedResidueIdentifier
-
- All Implemented Interfaces:
Serializable,Comparable<ChainNumberICode>,ChainNumberICode
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutablePdbNamedResidueIdentifier extends PdbNamedResidueIdentifier
Immutable implementation ofPdbNamedResidueIdentifier.Use the builder to create immutable instances:
ImmutablePdbNamedResidueIdentifier.builder(). Use the static factory method to create immutable instances:ImmutablePdbNamedResidueIdentifier.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePdbNamedResidueIdentifier.BuilderBuilds instances of typeImmutablePdbNamedResidueIdentifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePdbNamedResidueIdentifier.Builderbuilder()Creates a builder forImmutablePdbNamedResidueIdentifier.StringchainIdentifier()static ImmutablePdbNamedResidueIdentifiercopyOf(PdbNamedResidueIdentifier instance)Creates an immutable copy of aPdbNamedResidueIdentifiervalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePdbNamedResidueIdentifierthat have equal attribute values.inthashCode()Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode,oneLetterName.StringinsertionCode()static ImmutablePdbNamedResidueIdentifierof(String chainIdentifier, int residueNumber, String insertionCode, char oneLetterName)Construct a new immutablePdbNamedResidueIdentifierinstance.charoneLetterName()intresidueNumber()ImmutablePdbNamedResidueIdentifierwithChainIdentifier(String value)Copy the current immutable object by setting a value for thechainIdentifierattribute.ImmutablePdbNamedResidueIdentifierwithInsertionCode(String value)Copy the current immutable object by setting a value for theinsertionCodeattribute.ImmutablePdbNamedResidueIdentifierwithOneLetterName(char value)Copy the current immutable object by setting a value for theoneLetterNameattribute.ImmutablePdbNamedResidueIdentifierwithResidueNumber(int value)Copy the current immutable object by setting a value for theresidueNumberattribute.-
Methods inherited from class pl.poznan.put.pdb.PdbNamedResidueIdentifier
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 classPdbNamedResidueIdentifier- Returns:
- The value of the
chainIdentifierattribute
-
residueNumber
public int residueNumber()
- Specified by:
residueNumberin interfaceChainNumberICode- Specified by:
residueNumberin classPdbNamedResidueIdentifier- Returns:
- The value of the
residueNumberattribute
-
insertionCode
public String insertionCode()
- Specified by:
insertionCodein interfaceChainNumberICode- Specified by:
insertionCodein classPdbNamedResidueIdentifier- Returns:
- The value of the
insertionCodeattribute
-
oneLetterName
public char oneLetterName()
- Specified by:
oneLetterNamein classPdbNamedResidueIdentifier- Returns:
- The one letter name of the residue.
-
withChainIdentifier
public final ImmutablePdbNamedResidueIdentifier 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 ImmutablePdbNamedResidueIdentifier 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 ImmutablePdbNamedResidueIdentifier 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
-
withOneLetterName
public final ImmutablePdbNamedResidueIdentifier withOneLetterName(char value)
Copy the current immutable object by setting a value for theoneLetterNameattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for oneLetterName- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutablePdbNamedResidueIdentifierthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode,oneLetterName.
-
of
public static ImmutablePdbNamedResidueIdentifier of(String chainIdentifier, int residueNumber, String insertionCode, char oneLetterName)
Construct a new immutablePdbNamedResidueIdentifierinstance.- Parameters:
chainIdentifier- The value for thechainIdentifierattributeresidueNumber- The value for theresidueNumberattributeinsertionCode- The value for theinsertionCodeattributeoneLetterName- The value for theoneLetterNameattribute- Returns:
- An immutable PdbNamedResidueIdentifier instance
-
copyOf
public static ImmutablePdbNamedResidueIdentifier copyOf(PdbNamedResidueIdentifier instance)
Creates an immutable copy of aPdbNamedResidueIdentifiervalue. 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 PdbNamedResidueIdentifier instance
-
builder
public static ImmutablePdbNamedResidueIdentifier.Builder builder()
Creates a builder forImmutablePdbNamedResidueIdentifier.ImmutablePdbNamedResidueIdentifier.builder() .chainIdentifier(String) // requiredchainIdentifier.residueNumber(int) // requiredresidueNumber.insertionCode(String) // requiredinsertionCode.oneLetterName(char) // requiredoneLetterName.build();- Returns:
- A new ImmutablePdbNamedResidueIdentifier builder
-
-