S
- Source value Java typeD
- Target value Java typeTimeIterator<S>
public final class ValueAdapterTimeIterator<S,D> extends AdapterTimeIterator<S,D>
The adapter function is called once per sample and its result is cached to serve multiple next or peekNext calls.
Constructor | Description |
---|---|
ValueAdapterTimeIterator(TimeIterator<S> delegate,
Function<S,D> adapter) |
Build a new adapter around the given delegate, using the given mapping adapter function.
|
Modifier and Type | Method | Description |
---|---|---|
protected Sample<D> |
adapt(Sample<S> sample) |
Perform the adaptation.
|
hasNext, next, peekNext, toString
public ValueAdapterTimeIterator(TimeIterator<S> delegate, Function<S,D> adapter)
delegate
- Source iteratoradapter
- Value adpaterprotected Sample<D> adapt(Sample<S> sample)
AdapterTimeIterator
adapt
in class AdapterTimeIterator<S,D>
sample
- Sample to adaptCopyright © 2019. All rights reserved.