|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.nlp.util.Filters
public class Filters
Filters contains some simple implementations of the Filter interface.
Method Summary | |
---|---|
static Filter |
acceptFilter()
The acceptFilter accepts everything. |
static Filter |
andFilter(Filter f1,
Filter f2)
Filter that accepts only when both filters accept (AND). |
static Filter |
collectionAcceptFilter(Collection objs)
The collectionAcceptFilter accepts a certain collection. |
static Filter |
collectionAcceptFilter(Object[] objs)
The collectionAcceptFilter accepts a certain collection. |
static Filter |
collectionRejectFilter(Collection objs)
The collectionRejectFilter rejects a certain collection. |
static Filter |
collectionRejectFilter(Object[] objs)
The collectionRejectFilter rejects a certain collection. |
static Object[] |
filter(Object[] elems,
Filter filter)
Applies the given filter to each of the given elems, and returns the list of elems that were accepted. |
static Filter |
notFilter(Filter filter)
Filter that does the opposite of given filter (NOT). |
static Filter |
orFilter(Filter f1,
Filter f2)
Filter that accepts when either filter accepts (OR). |
static Filter |
rejectFilter()
The rejectFilter accepts nothing. |
static void |
retainAll(Collection elems,
Filter filter)
Removes all elems in the given Collection that aren't accepted by the given Filter. |
static Filter |
switchedFilter(Filter 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 Filter acceptFilter()
public static Filter rejectFilter()
public static Filter collectionAcceptFilter(Object[] objs)
public static Filter collectionAcceptFilter(Collection objs)
public static Filter collectionRejectFilter(Object[] objs)
public static Filter collectionRejectFilter(Collection objs)
public static Filter andFilter(Filter f1, Filter f2)
public static Filter orFilter(Filter f1, Filter f2)
public static Filter notFilter(Filter filter)
public static Filter switchedFilter(Filter filter, boolean negated)
public static Object[] filter(Object[] elems, Filter filter)
public static void retainAll(Collection elems, Filter filter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |