Package org.anchoranalysis.mpp.io.input
Class StackWithMap
Object
org.anchoranalysis.mpp.io.input.StackWithMap
- All Implemented Interfaces:
MultiInputSubMap<TimeSeries>
public class StackWithMap extends Object implements MultiInputSubMap<TimeSeries>
Combines a Stack with a map of other stacks.
-
Constructor Summary
Constructors Constructor Description StackWithMap(String mainObjectName, ProvidesStackInput mainInputObject) -
Method Summary
Modifier and Type Method Description voidadd(String name, StoreSupplier<TimeSeries> op)Adds an entry to the map.voidaddToStore(NamedProviderStore<TimeSeries> stackCollection, int seriesNum, Logger logger)Adds the main stack and other stacks to the store.voidaddToStore(NamedProviderStore<TimeSeries> stackCollection, Logger logger)Copies all the existing entries into aNamedProviderStore.voidclose(ErrorReporter errorReporter)Closes resources and cleans up.StoreSupplier<TimeSeries>get(String name)Retrieves an entry from the map.StringgetMainObjectName()Gets the name of the main object.StringinputName()Gets the input name.intnumFrames()Gets the number of frames.Optional<Path>pathForBinding()Gets the path for binding.
-
Constructor Details
-
Method Details
-
addToStore
public void addToStore(NamedProviderStore<TimeSeries> stackCollection, Logger logger) throws OperationFailedExceptionDescription copied from interface:MultiInputSubMapCopies all the existing entries into aNamedProviderStore.- Specified by:
addToStorein interfaceMultiInputSubMap<TimeSeries>- Parameters:
stackCollection- 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
-
addToStore
public void addToStore(NamedProviderStore<TimeSeries> stackCollection, int seriesNum, Logger logger) throws OperationFailedExceptionAdds the main stack and other stacks to the store.- Parameters:
stackCollection- the store to add the stacks toseriesNum- the series numberlogger- the logger for reporting errors- Throws:
OperationFailedException- if adding to the store fails
-
add
Description copied from interface:MultiInputSubMapAdds an entry to the map.- Specified by:
addin interfaceMultiInputSubMap<TimeSeries>- Parameters:
name- the name of the entryop- the supplier for the entry's value
-
close
Closes resources and cleans up.- Parameters:
errorReporter- for reporting any errors during closure
-
getMainObjectName
Gets the name of the main object.- Returns:
- the name of the main object
-
inputName
Gets the input name.- Returns:
- the input name
-
pathForBinding
Gets the path for binding.- Returns:
- an
Optionalcontaining the path for binding, if available
-
numFrames
Gets the number of frames.- Returns:
- the number of frames
- Throws:
OperationFailedException- if retrieving the number of frames fails
-
get
Description copied from interface:MultiInputSubMapRetrieves an entry from the map.- Specified by:
getin interfaceMultiInputSubMap<TimeSeries>- 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
-