public class ExtractFrameStore extends Object implements NamedProviderStore<TimeSeries>
NamedProviderStore<TimeSeries>
as a NamedProviderStore<Stack>
by
extracting a frame from each series.Constructor and Description |
---|
ExtractFrameStore(NamedProviderStore<Stack> stacks)
Creates to extract at time-index 0.
|
ExtractFrameStore(NamedProviderStore<Stack> stacks,
int timeIndex)
Creates to extract at time-index
timeIndex . |
Modifier and Type | Method and Description |
---|---|
void |
add(String identifier,
StoreSupplier<TimeSeries> supplier)
Adds an element to the store.
|
Optional<TimeSeries> |
getOptional(String key)
Retrieves the item if it exists, or returns
Optional.empty() if it doesn't exist. |
Set<String> |
keys()
Returns a set of keys associated with the provider.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArbitraryElement, getException, isEmpty
public ExtractFrameStore(NamedProviderStore<Stack> stacks)
stacks
- the underlying store of Stack
s.public ExtractFrameStore(NamedProviderStore<Stack> stacks, int timeIndex)
timeIndex
.stacks
- the underlying store of Stack
s.timeIndex
- the time-index to extract from each TimeSeries
.public Optional<TimeSeries> getOptional(String key) throws NamedProviderGetException
NamedProvider
Optional.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).
getOptional
in interface NamedProvider<TimeSeries>
key
- a unique name for the item.Optional.empty()
.NamedProviderGetException
- if no item exists for identifier
.public Set<String> keys()
NamedProvider
There's no guarantee that it refers to all valid keys.
keys
in interface NamedProvider<TimeSeries>
public void add(String identifier, StoreSupplier<TimeSeries> supplier) throws OperationFailedException
NamedProviderStore
add
in interface NamedProviderStore<TimeSeries>
identifier
- a unique identifier for the element.supplier
- supplies the element to be added (which may be evaluated immediately, or a
later point lazily).OperationFailedException
- if the identifier already exists, or otherwise the add
operation fails.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.