org.fusesource.common.util
Class Filters
java.lang.Object
org.fusesource.common.util.Filters
public class Filters
- extends java.lang.Object
|
Method Summary |
static
|
compositeFilter(java.util.List<Filter<T>> filters)
|
static Filter<java.lang.String> |
createStringFilter(java.lang.String text)
Returns a String pattern matching filter using ! for not and * for any characters |
static
|
falseFilter()
|
static
|
isEmpty(Filter<T> filter)
|
static
|
matches(T value,
java.util.List<? extends Filter<T>> filters)
Returns true if any of the filters matches the given value |
static
|
matches(T value,
java.util.List<? extends Filter<T>> includeFilters,
java.util.List<? extends Filter<T>> excludeFilters)
Return true if the value matches an include filter if specified and does not match an exclude filter |
static
|
not(Filter<T> filter)
|
static
|
or(Filter<T>... filters)
|
static
|
trueFilter()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Filters
public Filters()
trueFilter
public static <T> Filter<T> trueFilter()
falseFilter
public static <T> Filter<T> falseFilter()
matches
public static <T> boolean matches(T value,
java.util.List<? extends Filter<T>> filters)
- Returns true if any of the filters matches the given value
matches
public static <T> boolean matches(T value,
java.util.List<? extends Filter<T>> includeFilters,
java.util.List<? extends Filter<T>> excludeFilters)
- Return true if the value matches an include filter if specified and does not match an exclude filter
compositeFilter
public static <T> Filter<T> compositeFilter(java.util.List<Filter<T>> filters)
or
public static <T> Filter<T> or(Filter<T>... filters)
not
public static <T> Filter<T> not(Filter<T> filter)
isEmpty
public static <T> boolean isEmpty(Filter<T> filter)
createStringFilter
public static Filter<java.lang.String> createStringFilter(java.lang.String text)
- Returns a String pattern matching filter using ! for not and * for any characters
Copyright © 2015 Red Hat. All Rights Reserved.