Package com.ibm.wala.util.collections
Class IteratorUtil
- java.lang.Object
-
- com.ibm.wala.util.collections.IteratorUtil
-
public class IteratorUtil extends Object
utilities dealing with Iterators
-
-
Constructor Summary
Constructors Constructor Description IteratorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> boolean
contains(Iterator<? extends T> it, T o)
static <T> int
count(Iterator<T> it)
static <T,S extends T>
Iterator<S>filter(Iterator<T> iterator, Class<S> cls)
-
-
-
Method Detail
-
contains
public static <T> boolean contains(Iterator<? extends T> it, T o)
- Returns:
- true iff the Iterator returns some elements which equals() the object o
-
count
public static final <T> int count(Iterator<T> it) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-