|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xshare.base.collections.helpers.Find
This class contains some helper methods to search for elements in a collection of iteration which satisfy a given condition.
Method Summary | |
static java.util.List |
all(java.util.Collection aSource,
UnaryPredicate aCond)
Checks a given collection of elements for an condition expressed as UnaryPredicate
and returns a List with all elements
which satisfy the predicate. |
static java.util.List |
all(java.util.Iterator aSource,
UnaryPredicate aCond)
Checks a given iteration of elements for an condition expressed as UnaryPredicate
and returns a List with all elements
which satisfy the predicate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.util.List all(java.util.Collection aSource, UnaryPredicate aCond)
UnaryPredicate
and returns a List
with all elements
which satisfy the predicate.
aSource
- a Collection
representing
the collection to scan.aCond
- an UnaryPredicate
object
representing the condition for the scan.
List
object, containing all the
elements which satisfy the predicate. If no element
satisfied the predicate the returned list is empty.public static java.util.List all(java.util.Iterator aSource, UnaryPredicate aCond)
UnaryPredicate
and returns a List
with all elements
which satisfy the predicate.
aSource
- a Iterator
representing
the iteration to scan.aCond
- an UnaryPredicate
object
representing the condition for the scan.
List
object, containing all the
elements which satisfy the predicate. If no element
satisfied the predicate the returned list is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |