Class ImmutableCifContainer.Builder

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

@NotThreadSafe public static final class ImmutableCifContainer.Builder extends Object
Builds instances of type ImmutableCifContainer. 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 ImmutableCifContainer.Builder from(CifContainer instance)
      Fill a builder with attribute values from the provided CifContainer instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • putFileChainMap

      public final ImmutableCifContainer.Builder putFileChainMap(File key, org.apache.commons.collections4.BidiMap<String,String> value)
      Put one entry to the fileChainMap map.
      Parameters:
      key - The key in the fileChainMap map
      value - The associated value in the fileChainMap map
      Returns:
      this builder for use in a chained invocation
    • putFileChainMap

      public final ImmutableCifContainer.Builder putFileChainMap(Map.Entry<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entry)
      Put one entry to the fileChainMap map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • fileChainMap

      public final ImmutableCifContainer.Builder fileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)
      Sets or replaces all mappings from the specified map as entries for the fileChainMap map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the fileChainMap map
      Returns:
      this builder for use in a chained invocation
    • putAllFileChainMap

      public final ImmutableCifContainer.Builder putAllFileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)
      Put all mappings from the specified map as entries to fileChainMap map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the fileChainMap map
      Returns:
      this builder for use in a chained invocation
    • cifFile

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

      public ImmutableCifContainer build()
      Builds a new ImmutableCifContainer.
      Returns:
      An immutable instance of CifContainer
      Throws:
      IllegalStateException - if any required attributes are missing