org.shapelogic.streams
Class BaseListFilterTransformerStream<E,Out>
java.lang.Object
org.shapelogic.streams.BaseCommonStream<E>
org.shapelogic.streams.BaseListCommonStream<E>
org.shapelogic.streams.BaseListStream1<E,java.util.Map.Entry<E,Out>>
org.shapelogic.streams.BaseListFilterTransformerStream<E,Out>
- Type Parameters:
E
-
- All Implemented Interfaces:
- java.lang.Iterable<java.util.Map.Entry<E,Out>>, java.util.Iterator<java.util.Map.Entry<E,Out>>, Calc1<E,java.util.Map.Entry<E,Out>>, CalcValue<java.util.Map.Entry<E,Out>>, ContextGettable, LazyCalc<java.util.Map.Entry<E,Out>>, RecursiveContext, Transformer<E,Out>, FilterTransformerStream<E,Out>, InputStream1<E,java.util.Map.Entry<E,Out>>, ListStream<java.util.Map.Entry<E,Out>>, NumberedStream<java.util.Map.Entry<E,Out>>, Stream<java.util.Map.Entry<E,Out>>, StreamProperties
public abstract class BaseListFilterTransformerStream<E,Out>
- extends BaseListStream1<E,java.util.Map.Entry<E,Out>>
- implements FilterTransformerStream<E,Out>
This is the abstract class to override to make a ListFilterStream.
The code here is the same as what would be in the BaseFilterStream.
This is a little problematic there are 2 calculation that need to be made.
So they cannot both have the same method name: invoke(input)
You can either take one of them as a Transformer or as a Calc1 member.
This one is implementing Transformer
- Author:
- Sami Badawi
Method Summary |
java.util.Map.Entry<E,Out> |
invoke(E input)
|
java.util.Map.Entry<E,Out> |
invokeIndex(int index)
Ignore the index, and iterate over the input stream until a non null
value is found. |
Methods inherited from class org.shapelogic.streams.BaseCommonStream |
getContext, getInContext, getIndex, getLast, getMaxLast, getName, getParentContext, getValue, isDeterministic, isDirty, isNullLegalValue, remove, setMaxLast, setNullLegalValue, setup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
BaseListFilterTransformerStream
public BaseListFilterTransformerStream(NumberedStream<E> inputStream)
invoke
public java.util.Map.Entry<E,Out> invoke(E input)
- Specified by:
invoke
in interface Calc1<E,java.util.Map.Entry<E,Out>>
invokeIndex
public java.util.Map.Entry<E,Out> invokeIndex(int index)
- Ignore the index, and iterate over the input stream until a non null
value is found.
- Overrides:
invokeIndex
in class BaseListStream1<E,java.util.Map.Entry<E,Out>>
Copyright © 2009. All Rights Reserved.