Class EachElement
java.lang.Object
org.apache.commons.functor.generator.util.EachElement
Generator factory for each element of a "collection".
- Since:
- 1.0
- Version:
- $Revision$ $Date$
-
Constructor Summary
ConstructorsConstructorDescriptionEachElementinstances should NOT be constructed in standard programming. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> Generator<E> from(E[] array) Get a Generator for each element of an Object[].static <E> Generator<E> from(Collection<? extends E> collection) Get a Generator for each element of a Collection.static <E> Generator<E> Get a Generator for each element of an Iterator.Get a Generator for each entry of a Map.
-
Constructor Details
-
EachElement
public EachElement()EachElementinstances should NOT be constructed in standard programming. Instead, the methods of the class should be invoked statically.This constructor is public to permit tools that require a JavaBean instance to operate.
-
-
Method Details
-
from
Get a Generator for each element of a Collection.- Type Parameters:
E- the type of elements held in the input collection.- Parameters:
collection- to iterate- Returns:
- Generator
-
from
-
from
Get a Generator for each element of an Object[].- Type Parameters:
E- the type of elements held in the input array.- Parameters:
array- to iterate- Returns:
- Generator
-
from
-