Package jodd.util

Class InExRules<V,​P>


  • public class InExRules<V,​P>
    extends java.lang.Object
    Simple ruling engine for includes and excludes rules.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  InExRules.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)  
    • Field Detail

      • WILDCARD_STRING_MATCHER

        public static final java.util.function.Function<java.lang.String,​java.util.function.Predicate<java.lang.String>> WILDCARD_STRING_MATCHER
    • 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)