Package org.anchoranalysis.mpp.io.input
Class OperationMap<T>
Object
OperationMap<T>
- Type Parameters:
T
- the type of objects stored in the map
- All Implemented Interfaces:
MultiInputSubMap<T>
Stores objects as operations in a map, implementing the
MultiInputSubMap
interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String name, StoreSupplier<T> op) Adds an entry to the map.void
addToStore
(NamedProviderStore<T> namedStore, Logger logger) Copies all the existing entries into aNamedProviderStore
.Retrieves an entry from the map.getMap()
Retrieves the internal map storing the operations.
-
Constructor Details
-
OperationMap
public OperationMap()
-
-
Method Details
-
add
Description copied from interface:MultiInputSubMap
Adds an entry to the map.- Specified by:
add
in interfaceMultiInputSubMap<T>
- Parameters:
name
- the name of the entryop
- the supplier for the entry's value
-
addToStore
public void addToStore(NamedProviderStore<T> namedStore, Logger logger) throws OperationFailedException Description copied from interface:MultiInputSubMap
Copies all the existing entries into aNamedProviderStore
.- Specified by:
addToStore
in interfaceMultiInputSubMap<T>
- Parameters:
namedStore
- the store to copy the entries intologger
- a logger for any non-fatal errors- Throws:
OperationFailedException
- if a fatal error occurs during the copy process
-
get
Description copied from interface:MultiInputSubMap
Retrieves an entry from the map.- Specified by:
get
in interfaceMultiInputSubMap<T>
- Parameters:
name
- the name of the entry to retrieve- Returns:
- the
StoreSupplier
for the entry, or null if the entry doesn't exist - Throws:
OperationFailedException
- if an error occurs while retrieving the entry
-
getMap
Retrieves the internal map storing the operations.- Returns:
- the map of operations
-