Class ImmutablePdbHeaderLine.Builder

java.lang.Object
pl.poznan.put.pdb.ImmutablePdbHeaderLine.Builder
Enclosing class:
ImmutablePdbHeaderLine

@NotThreadSafe public static final class ImmutablePdbHeaderLine.Builder extends Object
Builds instances of type ImmutablePdbHeaderLine. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ImmutablePdbHeaderLine.Builder from(PdbHeaderLine instance)
      Fill a builder with attribute values from the provided PdbHeaderLine instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • classification

      public final ImmutablePdbHeaderLine.Builder classification(String classification)
      Initializes the value for the classification attribute.
      Parameters:
      classification - The value for classification
      Returns:
      this builder for use in a chained invocation
    • depositionDate

      public final ImmutablePdbHeaderLine.Builder depositionDate(Date depositionDate)
      Initializes the value for the depositionDate attribute.
      Parameters:
      depositionDate - The value for depositionDate
      Returns:
      this builder for use in a chained invocation
    • idCode

      public final ImmutablePdbHeaderLine.Builder idCode(String idCode)
      Initializes the value for the idCode attribute.
      Parameters:
      idCode - The value for idCode
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutablePdbHeaderLine build()
      Returns:
      An immutable instance of PdbHeaderLine
      Throws:
      IllegalStateException - if any required attributes are missing