Package pl.poznan.put.pdb.analysis
Class ImmutableCifContainer.Builder
java.lang.Object
pl.poznan.put.pdb.analysis.ImmutableCifContainer.Builder
- Enclosing class:
- ImmutableCifContainer
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableCifContainer
.Initializes the value for thecifFile
attribute.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 thefileChainMap
map.from
(CifContainer instance) Fill a builder with attribute values from the providedCifContainer
instance.putAllFileChainMap
(Map<? extends File, ? extends org.apache.commons.collections4.BidiMap<String, String>> entries) Put all mappings from the specified map as entries tofileChainMap
map.putFileChainMap
(File key, org.apache.commons.collections4.BidiMap<String, String> value) Put one entry to thefileChainMap
map.putFileChainMap
(Map.Entry<? extends File, ? extends org.apache.commons.collections4.BidiMap<String, String>> entry) Put one entry to thefileChainMap
map.
-
Method Details
-
from
Fill a builder with attribute values from the providedCifContainer
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 thefileChainMap
map.- Parameters:
key
- The key in the fileChainMap mapvalue
- 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 thefileChainMap
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 thefileChainMap
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 tofileChainMap
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
Initializes the value for thecifFile
attribute.- Parameters:
cifFile
- The value for cifFile- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCifContainer
.- Returns:
- An immutable instance of CifContainer
- Throws:
IllegalStateException
- if any required attributes are missing
-