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 TypeMethodDescriptionvoidadd(String name, StoreSupplier<T> op) Adds an entry to the map.voidaddToStore(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:MultiInputSubMapAdds an entry to the map.- Specified by:
addin 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:MultiInputSubMapCopies all the existing entries into aNamedProviderStore.- Specified by:
addToStorein 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:MultiInputSubMapRetrieves an entry from the map.- Specified by:
getin interfaceMultiInputSubMap<T>- Parameters:
name- the name of the entry to retrieve- Returns:
- the
StoreSupplierfor 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
-