E - type of enumerated elements.class SkipWhilePipeProcessor<E> extends AbstractPipeProcessor<E,E>
SkipPipeProcessor,
WhilePipeProcessorhasNextNeedsValue, nextOnSameSourceOnNoValue| Constructor and Description |
|---|
SkipWhilePipeProcessor(Predicate<E> filter)
Constructs a
SkipWhilePipeProcessor that skips enumerated
elements as long as the given filter holds true. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearOutputValue()
Clears the processed result after being returned by
AbstractPipeProcessor.retrieveOutputValue(). |
boolean |
hasOutputValue()
Gets whether processing was successful and the processor has a value
to yield.
|
boolean |
isInactive()
Gets whether the processor does not process any more and the pipeline
up to it should be discarded.
|
void |
processInputValue(E value)
Processes an input value in order to return a result, if any.
|
protected E |
retrieveOutputValue()
Retrieves the processed result produced by
AbstractPipeProcessor.processInputValue(Object). |
enqueueFilter, enqueueMap, getNext, getOutputValue, getSource, pushFrontFilter, pushFrontMap, setNext, setSourcepublic SkipWhilePipeProcessor(Predicate<E> filter)
SkipWhilePipeProcessor that skips enumerated
elements as long as the given filter holds true.
The new SkipWhilePipeProcessor stores its filter
internally.
filter - Predicate filtering skipped elements.public void processInputValue(E value)
AbstractPipeProcessorThe result of processing must be stored internally.
processInputValue in class AbstractPipeProcessor<E,E>value - Value to process.AbstractPipeProcessor.hasOutputValue(),
AbstractPipeProcessor.getOutputValue()public boolean hasOutputValue()
AbstractPipeProcessor
If AbstractPipeProcessor.hasOutputValue() returns false than no internal
storage of input or output may take place.
hasOutputValue in class AbstractPipeProcessor<E,E>AbstractPipeProcessor.processInputValue(java.lang.Object),
AbstractPipeProcessor.getOutputValue()protected E retrieveOutputValue()
AbstractPipeProcessorAbstractPipeProcessor.processInputValue(Object).retrieveOutputValue in class AbstractPipeProcessor<E,E>AbstractPipeProcessor.getOutputValue(),
AbstractPipeProcessor.clearOutputValue()protected void clearOutputValue()
AbstractPipeProcessorAbstractPipeProcessor.retrieveOutputValue().clearOutputValue in class AbstractPipeProcessor<E,E>AbstractPipeProcessor.getOutputValue(),
AbstractPipeProcessor.retrieveOutputValue()public boolean isInactive()
AbstractPipeProcessor
AbstractPipeProcessor.isInactive() returning true is equivalent to the
situation when no matter with what value
AbstractPipeProcessor.processInputValue(Object) will be called,
AbstractPipeProcessor.hasOutputValue() will always return false.
Most processors have this function return false with the
exception of while and limit compositions. These will
turn completely inactive once a certain condition is met.
isInactive in class AbstractPipeProcessor<E,E>true if processing must stop, false otherwise.Copyright © 2016. All rights reserved.