public class IteratorUtilities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
firstMatch(java.util.Iterator i,
Filter f)
Return the first element in an iterator that
matches the given filter, or null if there isn't one.
|
static java.lang.Object |
firstNotMatch(java.util.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(java.lang.String desc,
java.util.Iterator i)
Print every element of an iterator to stdout.
|
static void |
printElements(java.lang.String prefix,
java.lang.String desc,
java.util.Iterator i)
Print every element of an iterator to stdout.
|
public static java.lang.Object firstMatch(java.util.Iterator i, Filter f)
public static java.lang.Object firstNotMatch(java.util.Iterator i, Filter f)
public static void printElements(java.lang.String desc, java.util.Iterator i)
public static void printElements(java.lang.String prefix, java.lang.String desc, java.util.Iterator i)