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 class
Builds instances of typeImmutablePdbNamedResidueIdentifier
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutablePdbNamedResidueIdentifier
.copyOf
(PdbNamedResidueIdentifier instance) Creates an immutable copy of aPdbNamedResidueIdentifier
value.boolean
This instance is equal to all instances ofImmutablePdbNamedResidueIdentifier
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:chainIdentifier
,residueNumber
,insertionCode
,oneLetterName
.Construct a new immutablePdbNamedResidueIdentifier
instance.char
int
withChainIdentifier
(String value) Copy the current immutable object by setting a value for thechainIdentifier
attribute.withInsertionCode
(String value) Copy the current immutable object by setting a present value for the optionalinsertionCode
attribute.withInsertionCode
(Optional<String> optional) Copy the current immutable object by setting an optional value for theinsertionCode
attribute.withOneLetterName
(char value) Copy the current immutable object by setting a value for theoneLetterName
attribute.withResidueNumber
(int value) Copy the current immutable object by setting a value for theresidueNumber
attribute.Methods inherited from class pl.poznan.put.pdb.PdbNamedResidueIdentifier
toResidueIdentifier, 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 Details
-
chainIdentifier
- Specified by:
chainIdentifier
in interfaceChainNumberICode
- Specified by:
chainIdentifier
in classPdbNamedResidueIdentifier
- Returns:
- The value of the
chainIdentifier
attribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumber
in interfaceChainNumberICode
- Specified by:
residueNumber
in classPdbNamedResidueIdentifier
- Returns:
- The value of the
residueNumber
attribute
-
insertionCode
- Specified by:
insertionCode
in interfaceChainNumberICode
- Specified by:
insertionCode
in classPdbNamedResidueIdentifier
- Returns:
- The value of the
insertionCode
attribute
-
oneLetterName
public char oneLetterName()- Specified by:
oneLetterName
in classPdbNamedResidueIdentifier
- Returns:
- The one letter name of the residue.
-
withChainIdentifier
Copy the current immutable object by setting a value for thechainIdentifier
attribute. 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
this
object
-
withResidueNumber
Copy the current immutable object by setting a value for theresidueNumber
attribute. 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
this
object
-
withInsertionCode
Copy the current immutable object by setting a present value for the optionalinsertionCode
attribute.- Parameters:
value
- The value for insertionCode- Returns:
- A modified copy of
this
object
-
withInsertionCode
Copy the current immutable object by setting an optional value for theinsertionCode
attribute. 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
this
object
-
withOneLetterName
Copy the current immutable object by setting a value for theoneLetterName
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutablePdbNamedResidueIdentifier
that 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 immutablePdbNamedResidueIdentifier
instance.- Parameters:
chainIdentifier
- The value for thechainIdentifier
attributeresidueNumber
- The value for theresidueNumber
attributeinsertionCode
- The value for theinsertionCode
attributeoneLetterName
- The value for theoneLetterName
attribute- Returns:
- An immutable PdbNamedResidueIdentifier instance
-
copyOf
Creates an immutable copy of aPdbNamedResidueIdentifier
value. 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) // required
chainIdentifier
.residueNumber(int) // requiredresidueNumber
.insertionCode(String) // optionalinsertionCode
.oneLetterName(char) // requiredoneLetterName
.build();- Returns:
- A new ImmutablePdbNamedResidueIdentifier builder
-