| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.commons.collections.SetUtilspublic class SetUtilsextends java.lang.ObjectSet
and SortedSet instances.
Method Summary | |
static Set |
|
static SortedSet |
|
public static Set predicatedSet(Set set,
Predicate predicate)Returns a predicated set backed by the given set. Only objects that pass the test in the given predicate can be added to the set. It is important not to use the original set after invoking this method, as it is a backdoor for adding unvalidated objects.
- Parameters:
set- the set to predicate, must not be nullpredicate- the predicate for the set, must not be null
- Returns:
- a predicated set backed by the given set
public static SortedSet predicatedSortedSet(SortedSet set,
Predicate predicate)Returns a predicated sorted set backed by the given sorted set. Only objects that pass the test in the given predicate can be added to the sorted set. It is important not to use the original sorted set after invoking this method, as it is a backdoor for adding unvalidated objects.
- Parameters:
set- the sorted set to predicate, must not be nullpredicate- the predicate for the sorted set, must not be null
- Returns:
- a predicated sorted set backed by the given sorted set