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 of
PdbNamedResidueIdentifier.
Use the builder to create immutable instances:
ImmutablePdbNamedResidueIdentifier.builder().
Use the static factory method to create immutable instances:
ImmutablePdbNamedResidueIdentifier.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePdbNamedResidueIdentifier. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutablePdbNamedResidueIdentifier.copyOf(PdbNamedResidueIdentifier instance) Creates an immutable copy of aPdbNamedResidueIdentifiervalue.booleanThis instance is equal to all instances ofImmutablePdbNamedResidueIdentifierthat have equal attribute values.inthashCode()Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode,oneLetterName.Construct a new immutablePdbNamedResidueIdentifierinstance.charintwithChainIdentifier(String value) Copy the current immutable object by setting a value for thechainIdentifierattribute.withInsertionCode(String value) Copy the current immutable object by setting a present value for the optionalinsertionCodeattribute.withInsertionCode(Optional<String> optional) Copy the current immutable object by setting an optional value for theinsertionCodeattribute.withOneLetterName(char value) Copy the current immutable object by setting a value for theoneLetterNameattribute.withResidueNumber(int value) Copy the current immutable object by setting a value for theresidueNumberattribute.Methods inherited from class pl.poznan.put.pdb.PdbNamedResidueIdentifier
toResidueIdentifier, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareTo
-
Method Details
-
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
- 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
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
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
Copy the current immutable object by setting a present value for the optionalinsertionCodeattribute.- Parameters:
value- The value for insertionCode- Returns:
- A modified copy of
thisobject
-
withInsertionCode
Copy the current immutable object by setting an optional value for theinsertionCodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for insertionCode- Returns:
- A modified copy of
thisobject
-
withOneLetterName
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
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, Optional<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
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
Creates a builder forImmutablePdbNamedResidueIdentifier.ImmutablePdbNamedResidueIdentifier.builder() .chainIdentifier(String) // requiredchainIdentifier.residueNumber(int) // requiredresidueNumber.insertionCode(String) // optionalinsertionCode.oneLetterName(char) // requiredoneLetterName.build();- Returns:
- A new ImmutablePdbNamedResidueIdentifier builder
-