org.incava.util
Class Collect
public abstract class Collect
extends ArrayList
Collects a collections into a collection.
Collect(Collection c) - Creates a new collection, where the condition passes the condition.
|
Collect(Object[] ary) - Ditto, but for real arrays.
|
Object | block(Object obj) - Returns the object to add to the collection.
|
abstract boolean | where(Object obj) - Must be defined to return where the given object satisfies the condition.
|
Collect
public Collect(Collection c)
Creates a new collection, where the condition passes the condition.
c
- The collection from which to build the new collection.
Collect
public Collect(Object[] ary)
Ditto, but for real arrays.
block
public Object block(Object obj)
Returns the object to add to the collection.
obj
- An object from the collection passed to the constructor.
where
public abstract boolean where(Object obj)
Must be defined to return where the given object satisfies the condition.
obj
- An object from the collection passed to the constructor.