Package org.anchoranalysis.mpp.io.input
Class StackWithMap
Object
StackWithMap
- All Implemented Interfaces:
MultiInputSubMap<TimeSeries>
Combines a Stack with a map of other stacks.
-
Constructor Summary
ConstructorsConstructorDescriptionStackWithMap(String mainObjectName, ProvidesStackInput mainInputObject) Creates a newStackWithMapinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(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.Retrieves an entry from the map.Gets the name of the main object.Gets the input name.intGets the number of frames.Gets the path for binding.
-
Constructor Details
-
StackWithMap
Creates a newStackWithMapinstance.- Parameters:
mainObjectName- Needed for getting main-stack.mainInputObject- The main input object that provides the stack.
-
-
Method Details
-
addToStore
public void addToStore(NamedProviderStore<TimeSeries> stackCollection, Logger logger) throws OperationFailedException Description 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 OperationFailedException Adds 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
-