Package pl.poznan.put.pdb
Class ImmutablePdbAtomLine
java.lang.Object
pl.poznan.put.pdb.PdbAtomLine
pl.poznan.put.pdb.ImmutablePdbAtomLine
- All Implemented Interfaces:
Serializable
,Comparable<ChainNumberICode>
,ChainNumberICode
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutablePdbAtomLine
extends PdbAtomLine
Immutable implementation of
PdbAtomLine
.
Use the builder to create immutable instances:
ImmutablePdbAtomLine.builder()
.
Use the static factory method to create immutable instances:
ImmutablePdbAtomLine.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutablePdbAtomLine
. -
Method Summary
Modifier and TypeMethodDescriptionatomName()
static ImmutablePdbAtomLine.Builder
builder()
Creates a builder forImmutablePdbAtomLine
.charge()
static ImmutablePdbAtomLine
copyOf
(PdbAtomLine instance) Creates an immutable copy of aPdbAtomLine
value.boolean
This instance is equal to all instances ofImmutablePdbAtomLine
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:atomName
,residueName
,chainIdentifier
,residueNumber
,insertionCode
,x
,y
,z
.double
static ImmutablePdbAtomLine
of
(int serialNumber, String atomName, Optional<String> alternateLocation, String residueName, String chainIdentifier, int residueNumber, Optional<String> insertionCode, double x, double y, double z, double occupancy, double temperatureFactor, String elementSymbol, String charge) Construct a new immutablePdbAtomLine
instance.int
int
double
final ImmutablePdbAtomLine
withAlternateLocation
(String value) Copy the current immutable object by setting a present value for the optionalalternateLocation
attribute.final ImmutablePdbAtomLine
withAlternateLocation
(Optional<String> optional) Copy the current immutable object by setting an optional value for thealternateLocation
attribute.final ImmutablePdbAtomLine
withAtomName
(String value) Copy the current immutable object by setting a value for theatomName
attribute.final ImmutablePdbAtomLine
withChainIdentifier
(String value) Copy the current immutable object by setting a value for thechainIdentifier
attribute.final ImmutablePdbAtomLine
withCharge
(String value) Copy the current immutable object by setting a value for thecharge
attribute.final ImmutablePdbAtomLine
withElementSymbol
(String value) Copy the current immutable object by setting a value for theelementSymbol
attribute.final ImmutablePdbAtomLine
withInsertionCode
(String value) Copy the current immutable object by setting a present value for the optionalinsertionCode
attribute.final ImmutablePdbAtomLine
withInsertionCode
(Optional<String> optional) Copy the current immutable object by setting an optional value for theinsertionCode
attribute.final ImmutablePdbAtomLine
withOccupancy
(double value) Copy the current immutable object by setting a value for theoccupancy
attribute.final ImmutablePdbAtomLine
withResidueName
(String value) Copy the current immutable object by setting a value for theresidueName
attribute.final ImmutablePdbAtomLine
withResidueNumber
(int value) Copy the current immutable object by setting a value for theresidueNumber
attribute.final ImmutablePdbAtomLine
withSerialNumber
(int value) Copy the current immutable object by setting a value for theserialNumber
attribute.final ImmutablePdbAtomLine
withTemperatureFactor
(double value) Copy the current immutable object by setting a value for thetemperatureFactor
attribute.final ImmutablePdbAtomLine
withX
(double value) Copy the current immutable object by setting a value for thex
attribute.final ImmutablePdbAtomLine
withY
(double value) Copy the current immutable object by setting a value for they
attribute.final ImmutablePdbAtomLine
withZ
(double value) Copy the current immutable object by setting a value for thez
attribute.double
x()
double
y()
double
z()
Methods inherited from class pl.poznan.put.pdb.PdbAtomLine
detectAtomName, distanceTo, parse, parse, toCif, toPdb, toString, toVector3D
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
-
serialNumber
public int serialNumber()- Specified by:
serialNumber
in classPdbAtomLine
- Returns:
- The value of the
serialNumber
attribute
-
atomName
- Specified by:
atomName
in classPdbAtomLine
- Returns:
- The value of the
atomName
attribute
-
alternateLocation
- Specified by:
alternateLocation
in classPdbAtomLine
- Returns:
- The value of the
alternateLocation
attribute
-
residueName
- Specified by:
residueName
in classPdbAtomLine
- Returns:
- The value of the
residueName
attribute
-
chainIdentifier
- Specified by:
chainIdentifier
in interfaceChainNumberICode
- Specified by:
chainIdentifier
in classPdbAtomLine
- Returns:
- The value of the
chainIdentifier
attribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumber
in interfaceChainNumberICode
- Specified by:
residueNumber
in classPdbAtomLine
- Returns:
- The value of the
residueNumber
attribute
-
insertionCode
- Specified by:
insertionCode
in interfaceChainNumberICode
- Specified by:
insertionCode
in classPdbAtomLine
- Returns:
- The value of the
insertionCode
attribute
-
x
public double x()- Specified by:
x
in classPdbAtomLine
- Returns:
- The value of the
x
attribute
-
y
public double y()- Specified by:
y
in classPdbAtomLine
- Returns:
- The value of the
y
attribute
-
z
public double z()- Specified by:
z
in classPdbAtomLine
- Returns:
- The value of the
z
attribute
-
occupancy
public double occupancy()- Specified by:
occupancy
in classPdbAtomLine
- Returns:
- The value of the
occupancy
attribute
-
temperatureFactor
public double temperatureFactor()- Specified by:
temperatureFactor
in classPdbAtomLine
- Returns:
- The value of the
temperatureFactor
attribute
-
elementSymbol
- Specified by:
elementSymbol
in classPdbAtomLine
- Returns:
- The value of the
elementSymbol
attribute
-
charge
- Specified by:
charge
in classPdbAtomLine
- Returns:
- The value of the
charge
attribute
-
withSerialNumber
Copy the current immutable object by setting a value for theserialNumber
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for serialNumber- Returns:
- A modified copy of the
this
object
-
withAtomName
Copy the current immutable object by setting a value for theatomName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for atomName- Returns:
- A modified copy of the
this
object
-
withAlternateLocation
Copy the current immutable object by setting a present value for the optionalalternateLocation
attribute.- Parameters:
value
- The value for alternateLocation- Returns:
- A modified copy of
this
object
-
withAlternateLocation
Copy the current immutable object by setting an optional value for thealternateLocation
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for alternateLocation- Returns:
- A modified copy of
this
object
-
withResidueName
Copy the current immutable object by setting a value for theresidueName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for residueName- Returns:
- A modified copy of the
this
object
-
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
-
withX
Copy the current immutable object by setting a value for thex
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for x- Returns:
- A modified copy of the
this
object
-
withY
Copy the current immutable object by setting a value for they
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for y- Returns:
- A modified copy of the
this
object
-
withZ
Copy the current immutable object by setting a value for thez
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for z- Returns:
- A modified copy of the
this
object
-
withOccupancy
Copy the current immutable object by setting a value for theoccupancy
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for occupancy- Returns:
- A modified copy of the
this
object
-
withTemperatureFactor
Copy the current immutable object by setting a value for thetemperatureFactor
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for temperatureFactor- Returns:
- A modified copy of the
this
object
-
withElementSymbol
Copy the current immutable object by setting a value for theelementSymbol
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for elementSymbol- Returns:
- A modified copy of the
this
object
-
withCharge
Copy the current immutable object by setting a value for thecharge
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for charge- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutablePdbAtomLine
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:atomName
,residueName
,chainIdentifier
,residueNumber
,insertionCode
,x
,y
,z
. -
of
public static ImmutablePdbAtomLine of(int serialNumber, String atomName, Optional<String> alternateLocation, String residueName, String chainIdentifier, int residueNumber, Optional<String> insertionCode, double x, double y, double z, double occupancy, double temperatureFactor, String elementSymbol, String charge) Construct a new immutablePdbAtomLine
instance.- Parameters:
serialNumber
- The value for theserialNumber
attributeatomName
- The value for theatomName
attributealternateLocation
- The value for thealternateLocation
attributeresidueName
- The value for theresidueName
attributechainIdentifier
- The value for thechainIdentifier
attributeresidueNumber
- The value for theresidueNumber
attributeinsertionCode
- The value for theinsertionCode
attributex
- The value for thex
attributey
- The value for they
attributez
- The value for thez
attributeoccupancy
- The value for theoccupancy
attributetemperatureFactor
- The value for thetemperatureFactor
attributeelementSymbol
- The value for theelementSymbol
attributecharge
- The value for thecharge
attribute- Returns:
- An immutable PdbAtomLine instance
-
copyOf
Creates an immutable copy of aPdbAtomLine
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 PdbAtomLine instance
-
builder
Creates a builder forImmutablePdbAtomLine
.ImmutablePdbAtomLine.builder() .serialNumber(int) // required
serialNumber
.atomName(String) // requiredatomName
.alternateLocation(String) // optionalalternateLocation
.residueName(String) // requiredresidueName
.chainIdentifier(String) // requiredchainIdentifier
.residueNumber(int) // requiredresidueNumber
.insertionCode(String) // optionalinsertionCode
.x(double) // requiredx
.y(double) // requiredy
.z(double) // requiredz
.occupancy(double) // requiredoccupancy
.temperatureFactor(double) // requiredtemperatureFactor
.elementSymbol(String) // requiredelementSymbol
.charge(String) // requiredcharge
.build();- Returns:
- A new ImmutablePdbAtomLine builder
-