|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.Filters
public class Filters
Some simple implementations of the Filter interface.
Method Summary | ||
---|---|---|
static
|
acceptFilter()
The acceptFilter accepts everything. |
|
static
|
andFilter(Filter<E> f1,
Filter<E> f2)
Filter that accepts only when both filters accept (AND). |
|
static
|
collectionAcceptFilter(java.util.Collection<E> objs)
The collectionAcceptFilter accepts a certain collection. |
|
static
|
collectionAcceptFilter(E[] objs)
The collectionAcceptFilter accepts a certain collection. |
|
static
|
collectionRejectFilter(java.util.Collection<E> objs)
The collectionRejectFilter rejects a certain collection. |
|
static
|
collectionRejectFilter(E[] objs)
The collectionRejectFilter rejects a certain collection. |
|
static
|
filter(E[] elems,
Filter<E> filter)
Applies the given filter to each of the given elems, and returns the list of elems that were accepted. |
|
static
|
notFilter(Filter<E> filter)
Filter that does the opposite of given filter (NOT). |
|
static
|
orFilter(Filter<E> f1,
Filter<E> f2)
Filter that accepts when either filter accepts (OR). |
|
static
|
rejectFilter()
The rejectFilter accepts nothing. |
|
static
|
retainAll(java.util.Collection<E> elems,
Filter<? super E> filter)
Removes all elems in the given Collection that aren't accepted by the given Filter. |
|
static
|
switchedFilter(Filter<E> filter,
boolean negated)
Filter that's either negated or normal as specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Filter<T> acceptFilter()
public static <T> Filter<T> rejectFilter()
public static <E> Filter<E> collectionAcceptFilter(E[] objs)
public static <E> Filter<E> collectionAcceptFilter(java.util.Collection<E> objs)
public static <E> Filter<E> collectionRejectFilter(E[] objs)
public static <E> Filter<E> collectionRejectFilter(java.util.Collection<E> objs)
public static <E> Filter<E> andFilter(Filter<E> f1, Filter<E> f2)
public static <E> Filter<E> orFilter(Filter<E> f1, Filter<E> f2)
public static <E> Filter<E> notFilter(Filter<E> filter)
public static <E> Filter<E> switchedFilter(Filter<E> filter, boolean negated)
public static <E> E[] filter(E[] elems, Filter<E> filter)
public static <E> void retainAll(java.util.Collection<E> elems, Filter<? super E> filter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |