|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.util.Predicate<T>
public abstract class Predicate<T>
Interface for defining an arbitrary predicate on Objects.
| Field Summary | |
|---|---|
static Predicate |
FALSE
|
static Predicate |
TRUE
|
| Constructor Summary | |
|---|---|
Predicate()
|
|
| Method Summary | ||
|---|---|---|
Predicate<T> |
and(Predicate<T> conjunct)
Return a predicate that is a conjunction of this predicate and another predicate |
|
static
|
falsePred()
|
|
static
|
filter(java.util.Iterator<T> src,
Predicate<T> pred)
Filter a collection: generate a new list from an existing collection, consisting of the elements satisfying some predicate. |
|
static
|
isElementOf(java.util.Collection<T> c)
Create the predicate "is an element of c" |
|
Predicate<T> |
not()
Return a predicate that is a negation of this predicate |
|
Predicate<T> |
or(Predicate<T> disjunct)
Return a predicate that is a conjunction of this predicate and another predicate |
|
abstract boolean |
test(T t)
Test whether an Object satisfies this Predicate |
|
static
|
truePred()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Predicate FALSE
public static final Predicate TRUE
| Constructor Detail |
|---|
public Predicate()
| Method Detail |
|---|
public static <T> Predicate<T> truePred()
public static <T> Predicate<T> falsePred()
public abstract boolean test(T t)
Object satisfies this Predicate
public Predicate<T> not()
public Predicate<T> and(Predicate<T> conjunct)
public Predicate<T> or(Predicate<T> disjunct)
public static <T> Predicate<T> isElementOf(java.util.Collection<T> c)
public static <T> java.util.List<T> filter(java.util.Iterator<T> src,
Predicate<T> pred)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if src == null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||