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 classBuilds instances of typeImmutablePdbAtomLine. -
Method Summary
Modifier and TypeMethodDescriptionatomName()static ImmutablePdbAtomLine.Builderbuilder()Creates a builder forImmutablePdbAtomLine.charge()static ImmutablePdbAtomLinecopyOf(PdbAtomLine instance) Creates an immutable copy of aPdbAtomLinevalue.booleanThis instance is equal to all instances ofImmutablePdbAtomLinethat have equal attribute values.inthashCode()Computes a hash code from attributes:atomName,residueName,chainIdentifier,residueNumber,insertionCode,x,y,z.doublestatic ImmutablePdbAtomLineof(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 immutablePdbAtomLineinstance.intintdoublefinal ImmutablePdbAtomLinewithAlternateLocation(String value) Copy the current immutable object by setting a present value for the optionalalternateLocationattribute.final ImmutablePdbAtomLinewithAlternateLocation(Optional<String> optional) Copy the current immutable object by setting an optional value for thealternateLocationattribute.final ImmutablePdbAtomLinewithAtomName(String value) Copy the current immutable object by setting a value for theatomNameattribute.final ImmutablePdbAtomLinewithChainIdentifier(String value) Copy the current immutable object by setting a value for thechainIdentifierattribute.final ImmutablePdbAtomLinewithCharge(String value) Copy the current immutable object by setting a value for thechargeattribute.final ImmutablePdbAtomLinewithElementSymbol(String value) Copy the current immutable object by setting a value for theelementSymbolattribute.final ImmutablePdbAtomLinewithInsertionCode(String value) Copy the current immutable object by setting a present value for the optionalinsertionCodeattribute.final ImmutablePdbAtomLinewithInsertionCode(Optional<String> optional) Copy the current immutable object by setting an optional value for theinsertionCodeattribute.final ImmutablePdbAtomLinewithOccupancy(double value) Copy the current immutable object by setting a value for theoccupancyattribute.final ImmutablePdbAtomLinewithResidueName(String value) Copy the current immutable object by setting a value for theresidueNameattribute.final ImmutablePdbAtomLinewithResidueNumber(int value) Copy the current immutable object by setting a value for theresidueNumberattribute.final ImmutablePdbAtomLinewithSerialNumber(int value) Copy the current immutable object by setting a value for theserialNumberattribute.final ImmutablePdbAtomLinewithTemperatureFactor(double value) Copy the current immutable object by setting a value for thetemperatureFactorattribute.final ImmutablePdbAtomLinewithX(double value) Copy the current immutable object by setting a value for thexattribute.final ImmutablePdbAtomLinewithY(double value) Copy the current immutable object by setting a value for theyattribute.final ImmutablePdbAtomLinewithZ(double value) Copy the current immutable object by setting a value for thezattribute.doublex()doubley()doublez()Methods inherited from class pl.poznan.put.pdb.PdbAtomLine
detectAtomName, distanceTo, parse, parse, toCif, toPdb, toString, toVector3DMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareTo
-
Method Details
-
serialNumber
public int serialNumber()- Specified by:
serialNumberin classPdbAtomLine- Returns:
- The value of the
serialNumberattribute
-
atomName
- Specified by:
atomNamein classPdbAtomLine- Returns:
- The value of the
atomNameattribute
-
alternateLocation
- Specified by:
alternateLocationin classPdbAtomLine- Returns:
- The value of the
alternateLocationattribute
-
residueName
- Specified by:
residueNamein classPdbAtomLine- Returns:
- The value of the
residueNameattribute
-
chainIdentifier
- Specified by:
chainIdentifierin interfaceChainNumberICode- Specified by:
chainIdentifierin classPdbAtomLine- Returns:
- The value of the
chainIdentifierattribute
-
residueNumber
public int residueNumber()- Specified by:
residueNumberin interfaceChainNumberICode- Specified by:
residueNumberin classPdbAtomLine- Returns:
- The value of the
residueNumberattribute
-
insertionCode
- Specified by:
insertionCodein interfaceChainNumberICode- Specified by:
insertionCodein classPdbAtomLine- Returns:
- The value of the
insertionCodeattribute
-
x
public double x()- Specified by:
xin classPdbAtomLine- Returns:
- The value of the
xattribute
-
y
public double y()- Specified by:
yin classPdbAtomLine- Returns:
- The value of the
yattribute
-
z
public double z()- Specified by:
zin classPdbAtomLine- Returns:
- The value of the
zattribute
-
occupancy
public double occupancy()- Specified by:
occupancyin classPdbAtomLine- Returns:
- The value of the
occupancyattribute
-
temperatureFactor
public double temperatureFactor()- Specified by:
temperatureFactorin classPdbAtomLine- Returns:
- The value of the
temperatureFactorattribute
-
elementSymbol
- Specified by:
elementSymbolin classPdbAtomLine- Returns:
- The value of the
elementSymbolattribute
-
charge
- Specified by:
chargein classPdbAtomLine- Returns:
- The value of the
chargeattribute
-
withSerialNumber
Copy the current immutable object by setting a value for theserialNumberattribute. 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
thisobject
-
withAtomName
Copy the current immutable object by setting a value for theatomNameattribute. 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
thisobject
-
withAlternateLocation
Copy the current immutable object by setting a present value for the optionalalternateLocationattribute.- Parameters:
value- The value for alternateLocation- Returns:
- A modified copy of
thisobject
-
withAlternateLocation
Copy the current immutable object by setting an optional value for thealternateLocationattribute. 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
thisobject
-
withResidueName
Copy the current immutable object by setting a value for theresidueNameattribute. 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
thisobject
-
withChainIdentifier
Copy the current immutable object by setting a value for thechainIdentifierattribute. 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
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
-
withInsertionCode
Copy the current immutable object by setting a present value for the optionalinsertionCodeattribute.- Parameters:
value- The value for insertionCode- Returns:
- A modified copy of
thisobject
-
withInsertionCode
Copy the current immutable object by setting an optional value for theinsertionCodeattribute. 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
thisobject
-
withX
Copy the current immutable object by setting a value for thexattribute. 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
thisobject
-
withY
Copy the current immutable object by setting a value for theyattribute. 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
thisobject
-
withZ
Copy the current immutable object by setting a value for thezattribute. 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
thisobject
-
withOccupancy
Copy the current immutable object by setting a value for theoccupancyattribute. 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
thisobject
-
withTemperatureFactor
Copy the current immutable object by setting a value for thetemperatureFactorattribute. 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
thisobject
-
withElementSymbol
Copy the current immutable object by setting a value for theelementSymbolattribute. 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
thisobject
-
withCharge
Copy the current immutable object by setting a value for thechargeattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutablePdbAtomLinethat 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 immutablePdbAtomLineinstance.- Parameters:
serialNumber- The value for theserialNumberattributeatomName- The value for theatomNameattributealternateLocation- The value for thealternateLocationattributeresidueName- The value for theresidueNameattributechainIdentifier- The value for thechainIdentifierattributeresidueNumber- The value for theresidueNumberattributeinsertionCode- The value for theinsertionCodeattributex- The value for thexattributey- The value for theyattributez- The value for thezattributeoccupancy- The value for theoccupancyattributetemperatureFactor- The value for thetemperatureFactorattributeelementSymbol- The value for theelementSymbolattributecharge- The value for thechargeattribute- Returns:
- An immutable PdbAtomLine instance
-
copyOf
Creates an immutable copy of aPdbAtomLinevalue. 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) // requiredserialNumber.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
-