Package pl.poznan.put.external.dssr
Class ImmutableNucleotide
java.lang.Object
pl.poznan.put.external.dssr.ImmutableNucleotide
- All Implemented Interfaces:
Nucleotide
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableNucleotide
extends Object
implements Nucleotide
Immutable implementation of
Nucleotide
.
Use the builder to create immutable instances:
ImmutableNucleotide.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableNucleotide
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableNucleotide.Builder
builder()
Creates a builder forImmutableNucleotide
.static ImmutableNucleotide
copyOf
(Nucleotide instance) Creates an immutable copy of aNucleotide
value.boolean
This instance is equal to all instances ofImmutableNucleotide
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:id
,chainName
,oneLetterName
,residueNumber
.id()
int
toString()
Prints the immutable valueNucleotide
with attribute values.final ImmutableNucleotide
withChainName
(String value) Copy the current immutable object by setting a value for thechainName
attribute.final ImmutableNucleotide
Copy the current immutable object by setting a value for theid
attribute.final ImmutableNucleotide
withOneLetterName
(String value) Copy the current immutable object by setting a value for theoneLetterName
attribute.final ImmutableNucleotide
withResidueNumber
(int value) Copy the current immutable object by setting a value for theresidueNumber
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.external.dssr.Nucleotide
toNamedResidueIdentifer
-
Method Details
-
id
- Specified by:
id
in interfaceNucleotide
- Returns:
- The value of the
id
attribute
-
chainName
- Specified by:
chainName
in interfaceNucleotide
- Returns:
- The value of the
chainName
attribute
-
oneLetterName
- Specified by:
oneLetterName
in interfaceNucleotide
- Returns:
- The value of the
oneLetterName
attribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumber
in interfaceNucleotide
- Returns:
- The value of the
residueNumber
attribute
-
withId
Copy the current immutable object by setting a value for theid
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withChainName
Copy the current immutable object by setting a value for thechainName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for chainName- Returns:
- A modified copy of the
this
object
-
withOneLetterName
Copy the current immutable object by setting a value for theoneLetterName
attribute. An equals check 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
-
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
-
equals
This instance is equal to all instances ofImmutableNucleotide
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id
,chainName
,oneLetterName
,residueNumber
. -
toString
Prints the immutable valueNucleotide
with attribute values. -
copyOf
Creates an immutable copy of aNucleotide
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 Nucleotide instance
-
builder
Creates a builder forImmutableNucleotide
.ImmutableNucleotide.builder() .id(String) // required
id
.chainName(String) // requiredchainName
.oneLetterName(String) // requiredoneLetterName
.residueNumber(int) // requiredresidueNumber
.build();- Returns:
- A new ImmutableNucleotide builder
-