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 newStackWithMap
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String name, StoreSupplier<TimeSeries> op) Adds an entry to the map.void
addToStore
(NamedProviderStore<TimeSeries> stackCollection, int seriesNum, Logger logger) Adds the main stack and other stacks to the store.void
addToStore
(NamedProviderStore<TimeSeries> stackCollection, Logger logger) Copies all the existing entries into aNamedProviderStore
.void
close
(ErrorReporter errorReporter) Closes resources and cleans up.Retrieves an entry from the map.Gets the name of the main object.Gets the input name.int
Gets the number of frames.Gets the path for binding.
-
Constructor Details
-
StackWithMap
Creates a newStackWithMap
instance.- 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:MultiInputSubMap
Copies all the existing entries into aNamedProviderStore
.- Specified by:
addToStore
in 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:MultiInputSubMap
Adds an entry to the map.- Specified by:
add
in 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
Optional
containing 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:MultiInputSubMap
Retrieves an entry from the map.- Specified by:
get
in interfaceMultiInputSubMap<TimeSeries>
- 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
-