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 of
PdbResidueIdentifier.
Use the builder to create immutable instances:
ImmutablePdbResidueIdentifier.builder().
Use the static factory method to create immutable instances:
ImmutablePdbResidueIdentifier.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePdbResidueIdentifier. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutablePdbResidueIdentifier.copyOf(PdbResidueIdentifier instance) Creates an immutable copy of aPdbResidueIdentifiervalue.booleanThis instance is equal to all instances ofImmutablePdbResidueIdentifierthat have equal attribute values.inthashCode()Computes a hash code from attributes:chainIdentifier,residueNumber,insertionCode.Construct a new immutablePdbResidueIdentifierinstance.intwithChainIdentifier(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.withResidueNumber(int value) Copy the current immutable object by setting a value for theresidueNumberattribute.Methods inherited from class pl.poznan.put.pdb.PdbResidueIdentifier
from, 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 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
- Specified by:
insertionCodein interfaceChainNumberICode- Specified by:
insertionCodein classPdbResidueIdentifier- Returns:
- The value of the
insertionCodeattribute
-
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
-
equals
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, Optional<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
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
Creates a builder forImmutablePdbResidueIdentifier.ImmutablePdbResidueIdentifier.builder() .chainIdentifier(String) // requiredchainIdentifier.residueNumber(int) // requiredresidueNumber.insertionCode(String) // optionalinsertionCode.build();- Returns:
- A new ImmutablePdbResidueIdentifier builder
-