Package pl.poznan.put.pdb
Class ImmutablePdbHeaderLine
java.lang.Object
pl.poznan.put.pdb.PdbHeaderLine
pl.poznan.put.pdb.ImmutablePdbHeaderLine
- All Implemented Interfaces:
Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutablePdbHeaderLine
extends PdbHeaderLine
Immutable implementation of
PdbHeaderLine
.
Use the builder to create immutable instances:
ImmutablePdbHeaderLine.builder()
.
Use the static factory method to create immutable instances:
ImmutablePdbHeaderLine.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutablePdbHeaderLine
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutablePdbHeaderLine
.static ImmutablePdbHeaderLine
copyOf
(PdbHeaderLine instance) Creates an immutable copy of aPdbHeaderLine
value.boolean
This instance is equal to all instances ofImmutablePdbHeaderLine
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:classification
,depositionDate
,idCode
.idCode()
static ImmutablePdbHeaderLine
Construct a new immutablePdbHeaderLine
instance.final ImmutablePdbHeaderLine
withClassification
(String value) Copy the current immutable object by setting a value for theclassification
attribute.final ImmutablePdbHeaderLine
withDepositionDate
(Date value) Copy the current immutable object by setting a value for thedepositionDate
attribute.final ImmutablePdbHeaderLine
withIdCode
(String value) Copy the current immutable object by setting a value for theidCode
attribute.Methods inherited from class pl.poznan.put.pdb.PdbHeaderLine
parse, toPdb, toString
-
Method Details
-
classification
- Specified by:
classification
in classPdbHeaderLine
- Returns:
- The value of the
classification
attribute
-
depositionDate
- Specified by:
depositionDate
in classPdbHeaderLine
- Returns:
- The value of the
depositionDate
attribute
-
idCode
- Specified by:
idCode
in classPdbHeaderLine
- Returns:
- The value of the
idCode
attribute
-
withClassification
Copy the current immutable object by setting a value for theclassification
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for classification- Returns:
- A modified copy of the
this
object
-
withDepositionDate
Copy the current immutable object by setting a value for thedepositionDate
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for depositionDate- Returns:
- A modified copy of the
this
object
-
withIdCode
Copy the current immutable object by setting a value for theidCode
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for idCode- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutablePdbHeaderLine
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:classification
,depositionDate
,idCode
. -
of
Construct a new immutablePdbHeaderLine
instance.- Parameters:
classification
- The value for theclassification
attributedepositionDate
- The value for thedepositionDate
attributeidCode
- The value for theidCode
attribute- Returns:
- An immutable PdbHeaderLine instance
-
copyOf
Creates an immutable copy of aPdbHeaderLine
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 PdbHeaderLine instance
-
builder
Creates a builder forImmutablePdbHeaderLine
.ImmutablePdbHeaderLine.builder() .classification(String) // required
classification
.depositionDate(Date) // requireddepositionDate
.idCode(String) // requiredidCode
.build();- Returns:
- A new ImmutablePdbHeaderLine builder
-