|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.functor.generator.util.EachElement
public final class EachElement
Generator factory for each element of a "collection".
| Constructor Summary | |
|---|---|
EachElement()
EachElement instances should NOT be constructed in
standard programming. |
|
| Method Summary | ||
|---|---|---|
static
|
from(Collection<? extends E> collection)
Get a Generator for each element of a Collection. |
|
static
|
from(E[] array)
Get a Generator for each element of an Object[]. |
|
static
|
from(Iterator<? extends E> iter)
Get a Generator for each element of an Iterator. |
|
static
|
from(Map<? extends K,? extends V> map)
Get a Generator for each entry of a Map. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EachElement()
EachElement instances 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 Detail |
|---|
public static <E> Generator<E> from(Collection<? extends E> collection)
E - the type of elements held in the input collection.collection - to iterate
public static <K,V> Generator<Map.Entry<K,V>> from(Map<? extends K,? extends V> map)
K - the type of keys maintained by the input map.V - the type of mapped values in the input map.map - to iterate
public static <E> Generator<E> from(E[] array)
E - the type of elements held in the input array.array - to iterate
public static <E> Generator<E> from(Iterator<? extends E> iter)
E - the type of elements held in the input iterator.iter - to iterate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||