Class ExcludedIncludedFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ExcludedIncludedFilter EMPTY
      An empty filter with no excludes or includes.
      protected java.util.Set<java.lang.String> excludedSet  
      protected java.util.Set<java.lang.String> includedSet  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ExcludedIncludedFilter​(java.util.Collection<java.lang.String> toExcludeList, java.util.Collection<java.lang.String> toIncludeList)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ExcludedIncludedFilter fromCollections​(java.util.Collection<java.lang.String> toExclude, java.util.Collection<java.lang.String> toInclude)
      Provide a collection of values to exclude and/or a collection of values to include.
      static ExcludedIncludedFilter fromCommaSeparatedStrings​(java.lang.String toExclude, java.lang.String toInclude)
      Provide a comma-separated string of values to exclude and/or a comma-separated string of values to include.
      boolean shouldInclude​(java.lang.String itemName)  
      boolean willExclude​(java.lang.String itemName)  
      boolean willInclude​(java.lang.String itemName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • excludedSet

        protected final java.util.Set<java.lang.String> excludedSet
      • includedSet

        protected final java.util.Set<java.lang.String> includedSet
    • Constructor Detail

      • ExcludedIncludedFilter

        protected ExcludedIncludedFilter​(java.util.Collection<java.lang.String> toExcludeList,
                                         java.util.Collection<java.lang.String> toIncludeList)
    • Method Detail

      • fromCommaSeparatedStrings

        public static ExcludedIncludedFilter fromCommaSeparatedStrings​(java.lang.String toExclude,
                                                                       java.lang.String toInclude)
        Provide a comma-separated string of values to exclude and/or a comma-separated string of values to include. Exclusion rules always win.
      • fromCollections

        public static ExcludedIncludedFilter fromCollections​(java.util.Collection<java.lang.String> toExclude,
                                                             java.util.Collection<java.lang.String> toInclude)
        Provide a collection of values to exclude and/or a collection of values to include. Exclusion rules always win.
      • willExclude

        public boolean willExclude​(java.lang.String itemName)
      • willInclude

        public boolean willInclude​(java.lang.String itemName)
      • shouldInclude

        public final boolean shouldInclude​(java.lang.String itemName)