Package jodd.util
Class InExRules<V,P>
- java.lang.Object
-
- jodd.util.InExRules<V,P>
-
public class InExRules<V,P> extends java.lang.ObjectSimple ruling engine for includes and excludes rules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInExRules.InExType
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<java.lang.String,java.util.function.Predicate<java.lang.String>>WILDCARD_STRING_MATCHER
-
Constructor Summary
Constructors Constructor Description InExRules(InExRules.InExType inExType, java.util.function.Function<P,java.util.function.Predicate<V>> factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(V value, boolean flag)static InExRules<java.lang.String,java.lang.String>blacklist()voidexclude(P pattern)voidinclude(P pattern)booleanmatch(V value)protected booleanprocessExcludes(V value, boolean include)protected booleanprocessIncludes(V value, boolean include)static InExRules<java.lang.String,java.lang.String>whitelist()
-
-
-
Constructor Detail
-
InExRules
public InExRules(InExRules.InExType inExType, java.util.function.Function<P,java.util.function.Predicate<V>> factory)
-
-
Method Detail
-
blacklist
public static InExRules<java.lang.String,java.lang.String> blacklist()
-
whitelist
public static InExRules<java.lang.String,java.lang.String> whitelist()
-
include
public void include(P pattern)
-
exclude
public void exclude(P pattern)
-
match
public boolean match(V value)
-
apply
public boolean apply(V value, boolean flag)
-
processIncludes
protected boolean processIncludes(V value, boolean include)
-
processExcludes
protected boolean processExcludes(V value, boolean include)
-
-