|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.UnaryFunctor<java.util.Iterator<? extends T>,FilterIterator<T>>
net.sf.jga.fn.algorithm.RemoveAll<T>
public class RemoveAll<T>
Removes instances from an iteration. This functor returns an interator that skips specific values or values that meet a given condition. The underlying iterable is not modified.
Copyright © 2003 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
RemoveAll.Visitor
Interface for classes that may interpret an RemoveAll functor. |
| Constructor Summary | |
|---|---|
RemoveAll(Equality<T> eq,
T value)
Builds an RemoveAll functor that will remove instances of the given value from an iteration, using the given Equality. |
|
RemoveAll(T value)
Builds an RemoveAll functor that will remove instances of the given value from an iteration. |
|
RemoveAll(UnaryFunctor<T,java.lang.Boolean> test)
Builds an RemoveAll functor that will remove elements from an iteration that pass the given test |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(RemoveAll) method, if it
implements the nested Visitor interface. |
FilterIterator<T> |
fn(java.util.Iterator<? extends T> iterator)
Apply the functor to each element in the iteration and return an iterator over the results |
UnaryFunctor<T,java.lang.Boolean> |
getFunction()
Returns the functor used to process elements in an iteration. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, compose, compose, generate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RemoveAll(T value)
java.lang.IllegalArgumentException - if the test is null
public RemoveAll(Equality<T> eq,
T value)
java.lang.IllegalArgumentException - if the test is nullpublic RemoveAll(UnaryFunctor<T,java.lang.Boolean> test)
java.lang.IllegalArgumentException - if the test is null| Method Detail |
|---|
public UnaryFunctor<T,java.lang.Boolean> getFunction()
public FilterIterator<T> fn(java.util.Iterator<? extends T> iterator)
fn in class UnaryFunctor<java.util.Iterator<? extends T>,FilterIterator<T>>public void accept(Visitor v)
visit(RemoveAll) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class UnaryFunctor<java.util.Iterator<? extends T>,FilterIterator<T>>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||