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 classBuilds instances of typeImmutablePdbHeaderLine. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutablePdbHeaderLine.static ImmutablePdbHeaderLinecopyOf(PdbHeaderLine instance) Creates an immutable copy of aPdbHeaderLinevalue.booleanThis instance is equal to all instances ofImmutablePdbHeaderLinethat have equal attribute values.inthashCode()Computes a hash code from attributes:classification,depositionDate,idCode.idCode()static ImmutablePdbHeaderLineConstruct a new immutablePdbHeaderLineinstance.final ImmutablePdbHeaderLinewithClassification(String value) Copy the current immutable object by setting a value for theclassificationattribute.final ImmutablePdbHeaderLinewithDepositionDate(Date value) Copy the current immutable object by setting a value for thedepositionDateattribute.final ImmutablePdbHeaderLinewithIdCode(String value) Copy the current immutable object by setting a value for theidCodeattribute.Methods inherited from class pl.poznan.put.pdb.PdbHeaderLine
parse, toPdb, toString
-
Method Details
-
classification
- Specified by:
classificationin classPdbHeaderLine- Returns:
- The value of the
classificationattribute
-
depositionDate
- Specified by:
depositionDatein classPdbHeaderLine- Returns:
- The value of the
depositionDateattribute
-
idCode
- Specified by:
idCodein classPdbHeaderLine- Returns:
- The value of the
idCodeattribute
-
withClassification
Copy the current immutable object by setting a value for theclassificationattribute. 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
thisobject
-
withDepositionDate
Copy the current immutable object by setting a value for thedepositionDateattribute. 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
thisobject
-
withIdCode
Copy the current immutable object by setting a value for theidCodeattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutablePdbHeaderLinethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:classification,depositionDate,idCode. -
of
Construct a new immutablePdbHeaderLineinstance.- Parameters:
classification- The value for theclassificationattributedepositionDate- The value for thedepositionDateattributeidCode- The value for theidCodeattribute- Returns:
- An immutable PdbHeaderLine instance
-
copyOf
Creates an immutable copy of aPdbHeaderLinevalue. 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) // requiredclassification.depositionDate(Date) // requireddepositionDate.idCode(String) // requiredidCode.build();- Returns:
- A new ImmutablePdbHeaderLine builder
-