Class Iterables
- java.lang.Object
-
- org.codehaus.commons.compiler.util.iterator.Iterables
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Iterable<T>
filter(Iterable<? extends T> delegate, Predicate<? super T> predicate)
static <T> Iterator<T>
filter(Iterator<? extends T> delegate, Predicate<? super T> predicate)
static <T> Iterable<T>
filter(T[] delegate, Predicate<? super T> predicate)
static <T> Iterable<T>
filterByClass(Iterable<?> delegate, Class<T> qualifyingClass)
static <T> Iterable<T>
filterByClass(Object[] delegate, Class<T> qualifyingClass)
static <T> Iterator<T>
filterByClass(Iterator<?> delegate, Class<T> qualifyingClass)
static <T> T[]
toArray(Iterable<T> delegate, Class<T> elementType)
static <T> T[]
toArray(Iterator<T> delegate, Class<T> componentType)
-
-
-
Method Detail
-
filterByClass
public static <T> Iterable<T> filterByClass(Object[] delegate, Class<T> qualifyingClass)
- Returns:
- An
Iterable
that filters the delegate's elements by base class
-
filterByClass
public static <T> Iterable<T> filterByClass(Iterable<?> delegate, Class<T> qualifyingClass)
- Returns:
- An
Iterable
that filters the delegate's elements by base class
-
filterByClass
public static <T> Iterator<T> filterByClass(Iterator<?> delegate, Class<T> qualifyingClass)
- Returns:
- An
Iterator
that filters the delegate's products by base class
-
filter
public static <T> Iterable<T> filter(T[] delegate, Predicate<? super T> predicate)
- Returns:
- An
Iterable
that discriminates the delegate's elements with the predicate
-
filter
public static <T> Iterable<T> filter(Iterable<? extends T> delegate, Predicate<? super T> predicate)
- Returns:
- An
Iterable
that discriminates the delegate's elements with the predicate
-
filter
public static <T> Iterator<T> filter(Iterator<? extends T> delegate, Predicate<? super T> predicate)
- Returns:
- An
Iterator
that discriminates the delegate's products with the predicate
-
toArray
public static <T> T[] toArray(Iterable<T> delegate, Class<T> elementType)
- Returns:
- All elements of the delegate
-
-