Package pl.poznan.put.pdb.analysis
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 typeImmutableCifContainer. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCifContainerbuild()Builds a newImmutableCifContainer.ImmutableCifContainer.BuildercifFile(File cifFile)Initializes the value for thecifFileattribute.ImmutableCifContainer.BuilderfileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)Sets or replaces all mappings from the specified map as entries for thefileChainMapmap.ImmutableCifContainer.Builderfrom(CifContainer instance)Fill a builder with attribute values from the providedCifContainerinstance.ImmutableCifContainer.BuilderputAllFileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)Put all mappings from the specified map as entries tofileChainMapmap.ImmutableCifContainer.BuilderputFileChainMap(File key, org.apache.commons.collections4.BidiMap<String,String> value)Put one entry to thefileChainMapmap.ImmutableCifContainer.BuilderputFileChainMap(Map.Entry<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entry)Put one entry to thefileChainMapmap.
-
-
-
Method Detail
-
from
public final ImmutableCifContainer.Builder from(CifContainer instance)
Fill a builder with attribute values from the providedCifContainerinstance. 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:
thisbuilder 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 thefileChainMapmap.- Parameters:
key- The key in the fileChainMap mapvalue- The associated value in the fileChainMap map- Returns:
thisbuilder 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 thefileChainMapmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder 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 thefileChainMapmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the fileChainMap map- Returns:
thisbuilder 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 tofileChainMapmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the fileChainMap map- Returns:
thisbuilder for use in a chained invocation
-
cifFile
public final ImmutableCifContainer.Builder cifFile(File cifFile)
Initializes the value for thecifFileattribute.- Parameters:
cifFile- The value for cifFile- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCifContainer build()
Builds a newImmutableCifContainer.- Returns:
- An immutable instance of CifContainer
- Throws:
IllegalStateException- if any required attributes are missing
-
-