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)
Construct an IncludeExclude.
|
IncludeExclude(Set<ITEM> includeSet,
Predicate<ITEM> includePredicate,
Set<ITEM> excludeSet,
Predicate<ITEM> excludePredicate)
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)
If the Set
class also implements Predicate
, then that Predicate is
used to match against the set, otherwise a simple Set.contains(Object)
test is used.
public IncludeExclude(Set<ITEM> includeSet, Predicate<ITEM> includePredicate, Set<ITEM> excludeSet, Predicate<ITEM> excludePredicate)
SET
- the Set
typeincludeSet
- the Set of items that represent the included spaceincludePredicate
- the Predicate for included item testingexcludeSet
- the Set of items that represent the excluded spaceexcludePredicate
- the Predicate for excluded item testingCopyright © 1995-2016 Webtide. All Rights Reserved.