org.gcube.data.streams.generators
Interface Generator<E1,E2>
- Type Parameters:
E1 - the type of elements in the input streamE2 - the type of elements in the output stream
- All Known Implementing Classes:
- Filter, LoggingListener, NoOpGenerator, Processor
public interface Generator<E1,E2>
Yields elements of a Stream from elements of another Stream.
- Author:
- Fabio Simeoni
- See Also:
Stream
iteration
static final Iteration iteration
- The ongoing iteration.
yield
E2 yield(E1 element)
throws StreamSkipSignal,
StreamStopSignal
- Yields an element of a
Stream from an element of another Stream.
- Parameters:
element - the input element
- Returns:
- the output element
- Throws:
StreamSkipSignal - if no element should be yielded from the input element (i.e. the element should
not contribute to the output stream)
StreamStopSignal - if no further element should be yielded
RuntimeException - if no element can be yielded from the input element
Copyright © 2012. All Rights Reserved.