public final class Iterables extends Object
IteratorUtil
into one classConstructor and Description |
---|
Iterables() |
Modifier and Type | Method and Description |
---|---|
static <T,C extends Collection<T>> |
addAll(C collection,
Iterable<? extends T> iterable) |
static <T,C extends T> |
append(C item,
Iterable<T> iterable) |
static <T> ResourceIterable<T> |
asResourceIterable(Iterable<T> labels) |
static <T> ResourceIterable<T> |
asResourceIterable(ResourceIterator<T> it) |
static <T> Iterable<T> |
cache(Iterable<T> iterable) |
static <FROM,TO> Function<FROM,TO> |
cast() |
static <T,C> Iterable<T> |
cast(Iterable<C> iterable) |
static <T> Iterable<T> |
concat(Iterable<? extends T>... iterables) |
static <T> Iterable<T> |
concat(Iterable<Iterable<T>> iterables) |
static <T> Iterator<T> |
concat(Iterator<? extends T>... iterables) |
static <T> Iterator<T> |
concat(Iterator<Iterator<T>> iterators) |
static <T> ResourceIterator<T> |
concatResourceIterators(Iterator<ResourceIterator<T>> iterators) |
static long |
count(Iterable<?> iterable) |
static <T> Iterable<T> |
empty() |
static <X> Iterable<X> |
filter(Predicate<? super X> specification,
Iterable<X> i) |
static <X> Iterator<X> |
filter(Predicate<? super X> specification,
Iterator<X> i) |
static <X> X |
first(Iterable<? extends X> i) |
static <FROM,TO> Iterator<TO> |
flatMap(Function<? super FROM,? extends Iterator<TO>> function,
Iterator<FROM> from) |
static <X,I extends Iterable<? extends X>> |
flatten(I... multiIterator) |
static <T> int |
indexOf(T itemToFind,
Iterable<T> iterable)
Returns the index of the first occurrence of the specified element
in this iterable, or -1 if this iterable does not contain the element.
|
static <T,C extends T> |
iterable(C... items) |
static String |
join(String joinString,
Iterable<?> iter) |
static String |
join(String joinString,
Iterator<?> iter) |
static <X> X |
last(Iterable<? extends X> i) |
static <T> Function<Iterable<T>,Iterable<T>> |
limit(int limitItems) |
static <T> Iterable<T> |
limit(int limitItems,
Iterable<T> iterable) |
static <FROM,TO> Iterable<TO> |
map(Function<? super FROM,? extends TO> function,
Iterable<FROM> from) |
static <FROM,TO> Iterator<TO> |
map(Function<? super FROM,? extends TO> function,
Iterator<FROM> from) |
static <T> Iterable<T> |
mix(Iterable<T>... iterables) |
static <T> Iterable<T> |
option(T item) |
static <T,C extends T> |
prepend(C item,
Iterable<T> iterable) |
static <X> Iterable<X> |
reverse(Iterable<X> iterable) |
static <X> X |
single(Iterable<? extends X> i) |
static <X> Iterable<X> |
skip(int skip,
Iterable<X> iterable) |
static <T,S extends Comparable> |
sort(Iterable<T> iterable,
Function<T,S> compareFunction) |
static <T> T[] |
toArray(Class<T> componentType,
Iterable<T> iterable) |
static Object[] |
toArray(Iterable<Object> iterable) |
static <T> List<T> |
toList(Iterable<T> iterable) |
static <T> Set<T> |
toSet(Iterable<T> iterable) |
static String |
toString(Iterable<?> values,
String separator) |
static <T> Iterable<T> |
unique(Iterable<T> iterable) |
public static <T> Iterable<T> empty()
public static <T,C extends Collection<T>> C addAll(C collection, Iterable<? extends T> iterable)
public static long count(Iterable<?> iterable)
public static <X> X first(Iterable<? extends X> i)
public static <X> X single(Iterable<? extends X> i)
public static <X> X last(Iterable<? extends X> i)
@SafeVarargs public static <X,I extends Iterable<? extends X>> Iterable<X> flatten(I... multiIterator)
@SafeVarargs public static <T> Iterable<T> mix(Iterable<T>... iterables)
public static <FROM,TO> Iterable<TO> map(Function<? super FROM,? extends TO> function, Iterable<FROM> from)
public static <FROM,TO> Iterator<TO> map(Function<? super FROM,? extends TO> function, Iterator<FROM> from)
public static <FROM,TO> Iterator<TO> flatMap(Function<? super FROM,? extends Iterator<TO>> function, Iterator<FROM> from)
@SafeVarargs public static <T,C extends T> Iterable<T> iterable(C... items)
@SafeVarargs public static <T> Iterable<T> concat(Iterable<? extends T>... iterables)
@SafeVarargs public static <T> Iterator<T> concat(Iterator<? extends T>... iterables)
public static <T> ResourceIterator<T> concatResourceIterators(Iterator<ResourceIterator<T>> iterators)
public static <FROM,TO> Function<FROM,TO> cast()
public static <T> ResourceIterable<T> asResourceIterable(Iterable<T> labels)
public static <T> ResourceIterable<T> asResourceIterable(ResourceIterator<T> it)
public static <T> int indexOf(T itemToFind, Iterable<T> iterable)
public static <T> Iterable<T> option(T item)
public static <T,S extends Comparable> Iterable<T> sort(Iterable<T> iterable, Function<T,S> compareFunction)
Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.