|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hazelcast.util.IterableUtil
public final class IterableUtil
Utility functions for working with Iterable
Method Summary | ||
---|---|---|
static
|
getFirst(Iterable<T> iterable,
T defaultValue)
|
|
static
|
limit(Iterator<R> iterator,
int limit)
|
|
static
|
map(Iterable<T> iterable,
IFunction<T,R> mapper)
Transform the Iterable by applying a function to each element |
|
static
|
map(Iterator<T> iterator,
IFunction<T,R> mapper)
Transform the Iterator by applying a function to each element |
|
static
|
nullToEmpty(Iterable<T> iterable)
Return empty Iterable if argument is null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T getFirst(Iterable<T> iterable, T defaultValue)
public static <T,R> Iterable<R> map(Iterable<T> iterable, IFunction<T,R> mapper)
public static <T,R> Iterator<R> map(Iterator<T> iterator, IFunction<T,R> mapper)
public static <T,R> Iterator<R> limit(Iterator<R> iterator, int limit)
public static <T> Iterable<T> nullToEmpty(Iterable<T> iterable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |