Class ExtractFrameStore
Object
ExtractFrameStore
- All Implemented Interfaces:
NamedProvider<TimeSeries>,NamedProviderStore<TimeSeries>
Exposes a
NamedProviderStore<TimeSeries> as a NamedProviderStore<Stack> by
extracting a frame from each series.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionExtractFrameStore(NamedProviderStore<Stack> stacks) Creates to extract at time-index 0.ExtractFrameStore(NamedProviderStore<Stack> stacks, int timeIndex) Creates to extract at time-indextimeIndex. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String identifier, StoreSupplier<TimeSeries> supplier) Adds an element to the store.getOptional(String key) Retrieves the item if it exists, or returnsOptional.empty()if it doesn't exist.keys()Returns a set of keys associated with the provider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.anchoranalysis.core.identifier.provider.NamedProvider
getArbitraryElement, getException, isEmpty
-
Constructor Details
-
ExtractFrameStore
Creates to extract at time-index 0.- Parameters:
stacks- the underlying store ofStacks.
-
ExtractFrameStore
Creates to extract at time-indextimeIndex.- Parameters:
stacks- the underlying store ofStacks.timeIndex- the time-index to extract from eachTimeSeries.
-
-
Method Details
-
getOptional
Description copied from interface:NamedProviderRetrieves the item if it exists, or returnsOptional.empty()if it doesn't exist.Note that a 'key' might still throw an exception for another reason (but never because a particular key is absent).
- Specified by:
getOptionalin interfaceNamedProvider<TimeSeries>- Parameters:
key- a unique name for the item.- Returns:
- the item, if it exists, otherwise
Optional.empty(). - Throws:
NamedProviderGetException- if no item exists foridentifier.
-
keys
Description copied from interface:NamedProviderReturns a set of keys associated with the provider.There's no guarantee that it refers to all valid keys.
- Specified by:
keysin interfaceNamedProvider<TimeSeries>- Returns:
- a set of all keys associated with the provider.
-
add
public void add(String identifier, StoreSupplier<TimeSeries> supplier) throws OperationFailedException Description copied from interface:NamedProviderStoreAdds an element to the store.- Specified by:
addin interfaceNamedProviderStore<TimeSeries>- Parameters:
identifier- a unique identifier for the element.supplier- supplies the element to be added (which may be evaluated immediately, or a later point lazily).- Throws:
OperationFailedException- if the identifier already exists, or otherwise the add operation fails.
-