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 classBuilds instances of typeImmutableNucleotide. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableNucleotide.Builderbuilder()Creates a builder forImmutableNucleotide.static ImmutableNucleotidecopyOf(Nucleotide instance) Creates an immutable copy of aNucleotidevalue.booleanThis instance is equal to all instances ofImmutableNucleotidethat have equal attribute values.inthashCode()Computes a hash code from attributes:id,chainName,oneLetterName,residueNumber.id()inttoString()Prints the immutable valueNucleotidewith attribute values.final ImmutableNucleotidewithChainName(String value) Copy the current immutable object by setting a value for thechainNameattribute.final ImmutableNucleotideCopy the current immutable object by setting a value for theidattribute.final ImmutableNucleotidewithOneLetterName(String value) Copy the current immutable object by setting a value for theoneLetterNameattribute.final ImmutableNucleotidewithResidueNumber(int value) Copy the current immutable object by setting a value for theresidueNumberattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.external.dssr.Nucleotide
toNamedResidueIdentifer
-
Method Details
-
id
- Specified by:
idin interfaceNucleotide- Returns:
- The value of the
idattribute
-
chainName
- Specified by:
chainNamein interfaceNucleotide- Returns:
- The value of the
chainNameattribute
-
oneLetterName
- Specified by:
oneLetterNamein interfaceNucleotide- Returns:
- The value of the
oneLetterNameattribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumberin interfaceNucleotide- Returns:
- The value of the
residueNumberattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withChainName
Copy the current immutable object by setting a value for thechainNameattribute. 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
thisobject
-
withOneLetterName
Copy the current immutable object by setting a value for theoneLetterNameattribute. 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
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
-
equals
This instance is equal to all instances ofImmutableNucleotidethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,chainName,oneLetterName,residueNumber. -
toString
Prints the immutable valueNucleotidewith attribute values. -
copyOf
Creates an immutable copy of aNucleotidevalue. 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) // requiredid.chainName(String) // requiredchainName.oneLetterName(String) // requiredoneLetterName.residueNumber(int) // requiredresidueNumber.build();- Returns:
- A new ImmutableNucleotide builder
-