public class IteratorUtil extends java.lang.Object
Utility methods for working with Iterable objects
Type Params | Return Type | Name and description |
---|---|---|
|
public static int |
count(java.lang.Iterable iterable)
|
|
public static int |
count(java.util.Iterator i) |
<T> |
public static T |
single(java.lang.Iterable<T> iterable) A single item or null |
<T> |
public static T |
single(java.util.Iterator<T> i) |
<T> |
public static T |
singleOrNull(java.lang.Iterable<T> iterable) A single item or null |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
A single item or null
iterable
- The iterableT
- The itemA single item or null
iterable
- The iterableT
- The item