Class BaseListFilterStream<E>

  extended by org.shapelogic.streams.BaseCommonStream<E>
      extended by org.shapelogic.streams.BaseListCommonStream<E>
          extended by org.shapelogic.streams.BaseListIndexedStream1<E,E>
              extended by org.shapelogic.streams.BaseListFilterStream<E>
Type Parameters:
E -
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Iterator<E>, CalcValue<E>, ContextGettable, LazyCalc<E>, RecursiveContext, Predicate<E>, FilterStream<E>, IndexedInputStream1<E,E>, ListFilterStream<E>, ListStream<E>, NumberedStream<E>, Stream<E>, StreamProperties
Direct Known Subclasses:

public abstract class BaseListFilterStream<E>
extends BaseListIndexedStream1<E,E>
implements ListFilterStream<E>

This is the abstract class to override to make a ListFilterStream. The code here is the same as what would be in the BaseFilterStream.

Sami Badawi

Field Summary
Fields inherited from class org.shapelogic.streams.BaseListIndexedStream1
Fields inherited from class org.shapelogic.streams.BaseListCommonStream
Fields inherited from class org.shapelogic.streams.BaseCommonStream
_context, _current, _dirty, _last, _maxLast, _name, _nullLegalValue, _parentContext, _query, _value
Constructor Summary
BaseListFilterStream(NumberedStream<E> inputStream)
Method Summary
 E get(int index)
          Get next element without advancing _current.
 boolean hasNext()
 E invoke(E input, int index)
          Closure to calculated 1 individual element based on index and input for the same index.
 E next()
          Get next element and advance _current.
Methods inherited from class org.shapelogic.streams.BaseListIndexedStream1
getInput, getInputStream, getList, invokeIndex, setLastFromInput, setList
Methods inherited from class org.shapelogic.streams.BaseListCommonStream
calcAddNext, getCurrentSize, hasNextBase, isCached, isRandomAccess, iterator
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 org.shapelogic.predicate.Predicate
Methods inherited from interface org.shapelogic.streams.ListStream
getList, setList
Methods inherited from interface org.shapelogic.streams.NumberedStream
getIndex, getLast, getMaxLast, setMaxLast
Methods inherited from interface org.shapelogic.calculation.LazyCalc
isDirty, setup
Methods inherited from interface org.shapelogic.calculation.CalcValue
Methods inherited from interface java.util.Iterator
Methods inherited from interface java.lang.Iterable

Constructor Detail


public BaseListFilterStream(NumberedStream<E> inputStream)
Method Detail


public E invoke(E input,
                int index)
Description copied from interface: IndexedInputStream1
Closure to calculated 1 individual element based on index and input for the same index. Should later just call the invoke on the closure. Maybe this should be moved up later.

Specified by:
invoke in interface IndexedInputStream1<E,E>
index - of element in list


public E next()
Description copied from class: BaseListCommonStream
Get next element and advance _current.

Specified by:
next in interface java.util.Iterator<E>
next in class BaseListCommonStream<E>


public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>
hasNext in class BaseListCommonStream<E>


public E get(int index)
Description copied from class: BaseListCommonStream
Get next element without advancing _current.

Specified by:
get in interface NumberedStream<E>
get in class BaseListCommonStream<E>

Copyright © 2009. All Rights Reserved.