| Modifier and Type | Class and Description |
|---|---|
static interface |
IterableUtil.ElementWithContext<T>
A helper interface which extends the "iterator" pattern with the possibility to access not only the "current"
element, but also the previous and next element.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Collection<T> |
asCollection(Iterable<T> delegate)
|
static <T> Iterable<T> |
concat(Iterable<? extends Iterable<? extends T>> elements) |
static <T> Iterable<T> |
concat(Iterable<? extends T> element1,
Iterable<? extends T> element2) |
static <T> Iterable<T> |
concat(Iterable<? extends T> element1,
Iterable<? extends T> element2,
Iterable<? extends T> element3) |
static <T> Iterable<T> |
concat(Iterable<? extends T> element1,
Iterable<? extends T> element2,
Iterable<? extends T> element3,
Iterable<? extends T> element4) |
static <T> Iterable<T> |
concat(Iterable<? extends T> element1,
T... element2) |
static <T> Iterable<T> |
concat(T element1,
Iterable<? extends T> element2) |
static <T> Iterable<T> |
concat(T element1,
T element2,
Iterable<? extends T> element3) |
static <T> Iterable<T> |
filter(Iterable<? extends T> delegate,
Predicate<? super T> qualifies)
Returns an
Iterable which hides the elements of the delegate which do not qualifiy. |
static <T> Iterable<IterableUtil.ElementWithContext<T>> |
iterableWithContext(Iterable<? extends T> delegate) |
static <T> Iterator<IterableUtil.ElementWithContext<T>> |
iteratorWithContext(Iterable<? extends T> iterable) |
static <T> Iterable<T> |
repeat(T subject,
int n) |
static <E> Iterable<E> |
reverseList(List<? extends E> list) |
static <I,O> Iterable<O> |
transform(Iterable<? extends I> delegate,
Transformer<? super I,? extends O> transform)
Returns an iterable which contains the transformed elements of the delegate
|
static <T> Iterable<T> |
unmodifiableIterable(Iterable<? extends T> i) |
public static <T> Iterable<T> unmodifiableIterable(Iterable<? extends T> i)
Iterable which can't be modified through the Iterator.remove() methodpublic static <T> Iterable<T> repeat(T subject, int n)
Iterable producing the given subject n timespublic static <T> Iterable<T> concat(T element1, Iterable<? extends T> element2)
element1 and the elements of element2public static <T> Iterable<T> concat(T element1, T element2, Iterable<? extends T> element3)
public static <T> Iterable<T> concat(Iterable<? extends T> element1, T... element2)
element1 and element2public static <T> Iterable<T> concat(Iterable<? extends T> element1, Iterable<? extends T> element2)
element1 and element2public static <T> Iterable<T> concat(Iterable<? extends T> element1, Iterable<? extends T> element2, Iterable<? extends T> element3)
element1, element2 and element3public static <T> Iterable<T> concat(Iterable<? extends T> element1, Iterable<? extends T> element2, Iterable<? extends T> element3, Iterable<? extends T> element4)
element1, element2, element3 and element4public static <T> Iterable<T> concat(Iterable<? extends Iterable<? extends T>> elements)
elementspublic static <T> Iterable<T> filter(Iterable<? extends T> delegate, Predicate<? super T> qualifies)
Iterable which hides the elements of the delegate which do not qualifiy.public static <I,O> Iterable<O> transform(Iterable<? extends I> delegate, Transformer<? super I,? extends O> transform)
public static <T> Collection<T> asCollection(Iterable<T> delegate)
public static <T> Iterable<IterableUtil.ElementWithContext<T>> iterableWithContext(Iterable<? extends T> delegate)
public static <T> Iterator<IterableUtil.ElementWithContext<T>> iteratorWithContext(Iterable<? extends T> iterable)
iterable - Must produce non-null valuesIterableUtil.ElementWithContexts for the elements of the given
iterableCopyright © 2017 Arno Unkrig. All rights reserved.