| net.sf.jga.fn.algorithm.ReplaceAll
ReplaceAll | public class ReplaceAll extends UnaryFunctor,TransformIterator> (Code) | | Replaces all instances in an iteration that pass the given test with the
given value.
To Serialize a ReplaceAll, the generic parameter T must be serializable.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | ReplaceAll(UnaryFunctor<T, Boolean> test, T value) Builds an ReplaceAll functor that will apply the given test to
elements in an iteration, and replace those elements that pass with the
given value. |
serialVersionUID | final static long serialVersionUID(Code) | | |
ReplaceAll | public ReplaceAll(UnaryFunctor<T, Boolean> test, T value)(Code) | | Builds an ReplaceAll functor that will apply the given test to
elements in an iteration, and replace those elements that pass with the
given value.
throws: IllegalArgumentException - if the test is null |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(ReplaceAll) method, if it
implements the nested Visitor interface.
|
fn | public TransformIterator<T, T> fn(Iterator<? extends T> iterator)(Code) | | Apply the functor to each element in the iteration and return an iterator
over the results
an iterator over the results of the transformation |
getFunction | public UnaryFunctor<T, T> getFunction()(Code) | | Returns the functor used to process elements in an iteration.
|
getValue | public T getValue()(Code) | | Returns the replacement value
|
|
|