| net.sf.jga.fn.algorithm.FindAdjacent
FindAdjacent | public class FindAdjacent extends LookAheadFunctor (Code) | | Locates pairs of adjacent values in an iteration.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | FindAdjacent() Builds a FindAdjacent functor that uses the equals() method to determine
if adjacent values are the same. | public | FindAdjacent(BinaryFunctor<T, T, Boolean> eq) Builds a FindAdjacent functor that uses the given predicate to determine
if adjacent values are the same. |
serialVersionUID | final static long serialVersionUID(Code) | | |
FindAdjacent | public FindAdjacent()(Code) | | Builds a FindAdjacent functor that uses the equals() method to determine
if adjacent values are the same.
|
FindAdjacent | public FindAdjacent(BinaryFunctor<T, T, Boolean> eq)(Code) | | Builds a FindAdjacent functor that uses the given predicate to determine
if adjacent values are the same. The functor argument is expected to
compare two values and return TRUE if they are considered to be equal..
|
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(FindAdjacent) method, if it
implements the nested Visitor interface.
|
fn | public LookAheadIterator<T> fn(Iterator<? extends T> iterator)(Code) | | Locates the first/next pair of adjacent elements in an iteration that
are the same value.
an iterator whose next() [if it hasNext()] points to the first ofa pair of adjacent equivalent values. If no such pair exists, then theiterator's hasNext() will be false. |
getComparisonFn | public BinaryFunctor<T, T, Boolean> getComparisonFn()(Code) | | Returns the functor used to determine if two adjacent values are the same
|
|
|