java.lang.Objectorg.supermind.crawl.scope.AbstractScope<T>
public abstract class AbstractScope<T>
Limits the scope of an operation through ScopeFilter
s. ScopeFilters
are run sequentially, in the same order that they are added.
Field Summary | |
---|---|
protected boolean |
allowByDefault
Should isInScope(T) return true when all filters abstain? |
protected java.util.List<ScopeFilter> |
filters
|
Constructor Summary | |
---|---|
AbstractScope()
|
Method Summary | |
---|---|
void |
add(ScopeFilter<T> filter)
Add a ScopeFilter. |
boolean |
isInScope(T t)
Is the parameter within this scope? If all filters abstain, allowByDefault is returned. |
void |
setAllowByDefault(boolean allowByDefault)
|
void |
setFilters(java.util.List<ScopeFilter> filters)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean allowByDefault
isInScope(T)
return true when all filters abstain?
protected java.util.List<ScopeFilter> filters
Constructor Detail |
---|
public AbstractScope()
Method Detail |
---|
public void add(ScopeFilter<T> filter)
filter
- public boolean isInScope(T t)
allowByDefault
is returned.
t
- input
public void setAllowByDefault(boolean allowByDefault)
public void setFilters(java.util.List<ScopeFilter> filters)