org.incava.util

Class Collect

public abstract class Collect extends ArrayList

Collects a collections into a collection.
Constructor Summary
Collect(Collection c)
Creates a new collection, where the condition passes the condition.
Collect(Object[] ary)
Ditto, but for real arrays.
Method Summary
Objectblock(Object obj)
Returns the object to add to the collection.
abstract booleanwhere(Object obj)
Must be defined to return where the given object satisfies the condition.

Constructor Detail

Collect

public Collect(Collection c)
Creates a new collection, where the condition passes the condition.

Parameters: c The collection from which to build the new collection.

Collect

public Collect(Object[] ary)
Ditto, but for real arrays.

Method Detail

block

public Object block(Object obj)
Returns the object to add to the collection.

Parameters: 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.

Parameters: obj An object from the collection passed to the constructor.