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 ofPdbHeaderLine.Use the builder to create immutable instances:
ImmutablePdbHeaderLine.builder(). Use the static factory method to create immutable instances:ImmutablePdbHeaderLine.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePdbHeaderLine.BuilderBuilds instances of typeImmutablePdbHeaderLine.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePdbHeaderLine.Builderbuilder()Creates a builder forImmutablePdbHeaderLine.Stringclassification()static ImmutablePdbHeaderLinecopyOf(PdbHeaderLine instance)Creates an immutable copy of aPdbHeaderLinevalue.DatedepositionDate()booleanequals(Object another)This instance is equal to all instances ofImmutablePdbHeaderLinethat have equal attribute values.inthashCode()Computes a hash code from attributes:classification,depositionDate,idCode.StringidCode()static ImmutablePdbHeaderLineof(String classification, Date depositionDate, String idCode)Construct a new immutablePdbHeaderLineinstance.ImmutablePdbHeaderLinewithClassification(String value)Copy the current immutable object by setting a value for theclassificationattribute.ImmutablePdbHeaderLinewithDepositionDate(Date value)Copy the current immutable object by setting a value for thedepositionDateattribute.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 Detail
-
classification
public String classification()
- Specified by:
classificationin classPdbHeaderLine- Returns:
- The value of the
classificationattribute
-
depositionDate
public Date depositionDate()
- Specified by:
depositionDatein classPdbHeaderLine- Returns:
- The value of the
depositionDateattribute
-
idCode
public String idCode()
- Specified by:
idCodein classPdbHeaderLine- Returns:
- The value of the
idCodeattribute
-
withClassification
public final ImmutablePdbHeaderLine withClassification(String value)
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
public final ImmutablePdbHeaderLine withDepositionDate(Date value)
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
public final ImmutablePdbHeaderLine withIdCode(String value)
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
public boolean equals(@Nullable Object another)
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
public static ImmutablePdbHeaderLine of(String classification, Date depositionDate, String idCode)
Construct a new immutablePdbHeaderLineinstance.- Parameters:
classification- The value for theclassificationattributedepositionDate- The value for thedepositionDateattributeidCode- The value for theidCodeattribute- Returns:
- An immutable PdbHeaderLine instance
-
copyOf
public static ImmutablePdbHeaderLine copyOf(PdbHeaderLine instance)
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
public static ImmutablePdbHeaderLine.Builder builder()
Creates a builder forImmutablePdbHeaderLine.ImmutablePdbHeaderLine.builder() .classification(String) // requiredclassification.depositionDate(Date) // requireddepositionDate.idCode(String) // requiredidCode.build();- Returns:
- A new ImmutablePdbHeaderLine builder
-
-