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 class
Builds instances of typeImmutablePdbResidueIdentifier
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutablePdbResidueIdentifier
.copyOf
(PdbResidueIdentifier instance) Creates an immutable copy of aPdbResidueIdentifier
value.boolean
This instance is equal to all instances ofImmutablePdbResidueIdentifier
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:chainIdentifier
,residueNumber
,insertionCode
.Construct a new immutablePdbResidueIdentifier
instance.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.withResidueNumber
(int value) Copy the current immutable object by setting a value for theresidueNumber
attribute.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 Details
-
chainIdentifier
- Specified by:
chainIdentifier
in interfaceChainNumberICode
- Specified by:
chainIdentifier
in classPdbResidueIdentifier
- Returns:
- The value of the
chainIdentifier
attribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumber
in interfaceChainNumberICode
- Specified by:
residueNumber
in classPdbResidueIdentifier
- Returns:
- The value of the
residueNumber
attribute
-
insertionCode
- Specified by:
insertionCode
in interfaceChainNumberICode
- Specified by:
insertionCode
in classPdbResidueIdentifier
- Returns:
- The value of the
insertionCode
attribute
-
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
-
equals
This instance is equal to all instances ofImmutablePdbResidueIdentifier
that 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 immutablePdbResidueIdentifier
instance.- Parameters:
chainIdentifier
- The value for thechainIdentifier
attributeresidueNumber
- The value for theresidueNumber
attributeinsertionCode
- The value for theinsertionCode
attribute- Returns:
- An immutable PdbResidueIdentifier instance
-
copyOf
Creates an immutable copy of aPdbResidueIdentifier
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 PdbResidueIdentifier instance
-
builder
Creates a builder forImmutablePdbResidueIdentifier
.ImmutablePdbResidueIdentifier.builder() .chainIdentifier(String) // required
chainIdentifier
.residueNumber(int) // requiredresidueNumber
.insertionCode(String) // optionalinsertionCode
.build();- Returns:
- A new ImmutablePdbResidueIdentifier builder
-