|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.IteratorUtilities
public class IteratorUtilities
A collection of utilities dealing with iterators.
Method Summary | |
---|---|
static Object |
firstMatch(Iterator i,
Filter f)
Return the first element in an iterator that matches the given filter, or null if there isn't one. |
static Object |
firstNotMatch(Iterator i,
Filter f)
Return the first element in an iterator that doesn't match the given filter, or null if there isn't one. |
static void |
printElements(String desc,
Iterator i)
Print every element of an iterator to stdout. |
static void |
printElements(String prefix,
String desc,
Iterator i)
Print every element of an iterator to stdout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Object firstMatch(Iterator i, Filter f)
public static Object firstNotMatch(Iterator i, Filter f)
public static void printElements(String desc, Iterator i)
public static void printElements(String prefix, String desc, Iterator i)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |