Class IteratorUtil
- java.lang.Object
-
- net.sourceforge.pmd.internal.util.IteratorUtil
-
public final class IteratorUtil extends java.lang.Object
- Since:
- 6.11.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.Iterable<T>
asReversed(java.util.List<T> lst)
static int
count(java.util.Iterator<?> it)
Counts the items in this iterator, exhausting it.static <T> java.util.Iterator<T>
reverse(java.util.Iterator<T> it)
static <T> java.lang.Iterable<T>
toIterable(java.util.Iterator<T> it)
static <T> java.util.List<T>
toList(java.util.Iterator<T> it)
-
-
-
Method Detail
-
reverse
public static <T> java.util.Iterator<T> reverse(java.util.Iterator<T> it)
-
toList
public static <T> java.util.List<T> toList(java.util.Iterator<T> it)
-
toIterable
public static <T> java.lang.Iterable<T> toIterable(java.util.Iterator<T> it)
-
count
public static int count(java.util.Iterator<?> it)
Counts the items in this iterator, exhausting it.
-
asReversed
public static <T> java.lang.Iterable<T> asReversed(java.util.List<T> lst)
-
-