org.shapelogic.streams
Class PredicateListFilterStream<E>

java.lang.Object
  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>
                  extended by org.shapelogic.streams.PredicateListFilterStream<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

public class PredicateListFilterStream<E>
extends BaseListFilterStream<E>

For ListFilterStream that just takes an input predicate.

Author:
Sami Badawi

Field Summary
protected  Predicate<E> _predicate
           
 
Fields inherited from class org.shapelogic.streams.BaseListIndexedStream1
_inputStream
 
Fields inherited from class org.shapelogic.streams.BaseListCommonStream
_list
 
Fields inherited from class org.shapelogic.streams.BaseCommonStream
_context, _current, _dirty, _last, _maxLast, _name, _nullLegalValue, _parentContext, _query, _value
 
Constructor Summary
PredicateListFilterStream(NumberedStream<E> inputStream, Predicate<E> predicate)
           
 
Method Summary
 boolean evaluate(E input)
          Evaluate the component predicates.
 Predicate<E> getPredicate()
           
 
Methods inherited from class org.shapelogic.streams.BaseListFilterStream
get, hasNext, invoke, next
 
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.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
getValue
 
Methods inherited from interface java.util.Iterator
remove
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

_predicate

protected final Predicate<E> _predicate
Constructor Detail

PredicateListFilterStream

public PredicateListFilterStream(NumberedStream<E> inputStream,
                                 Predicate<E> predicate)
Method Detail

evaluate

public boolean evaluate(E input)
Evaluate the component predicates.


getPredicate

public Predicate<E> getPredicate()


Copyright © 2009. All Rights Reserved.