public class IteratorUtilities extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
public static Object firstMatch(Iterator i, Filter f)
public static Object firstNotMatch(Iterator i, Filter f)
public static void printElements(String desc, Iterator i)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.