ITEM
- The type of elementpublic class IncludeExclude<ITEM> extends Object
Maintains a set of included and excluded elements. The method matches(Object)
will return true IFF the passed object is not in the excluded set AND ( either the
included set is empty OR the object is in the included set)
The type of the underlying Set
used may be passed into the
constructor, so special sets like Servlet PathMap may be used.
Constructor and Description |
---|
IncludeExclude()
Default constructor over
HashSet |
IncludeExclude(Class<SET> setClass,
BiFunction<SET,ITEM,Boolean> matcher)
Construct an IncludeExclude
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
exclude(ITEM... element) |
void |
exclude(ITEM element) |
Set<ITEM> |
getExcluded() |
Set<ITEM> |
getIncluded() |
void |
include(ITEM... element) |
void |
include(ITEM element) |
boolean |
matches(ITEM e) |
int |
size() |
String |
toString() |
public IncludeExclude()
HashSet
public IncludeExclude(Class<SET> setClass, BiFunction<SET,ITEM,Boolean> matcher)
setClass
- The type of Set
to using internallymatcher
- A function to test if a passed ITEM is matched by the passed SET, or null to use Set.contains(Object)
Copyright © 1995-2015 Webtide. All Rights Reserved.