public class DictionaryFilter extends AbstractSingleTermFilter
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Term> |
allowedTerms
The set of terms allowed by the filter.
|
Constructor and Description |
---|
DictionaryFilter()
Creates a new
DictionaryFilter with an empty set of allowed
terms. |
DictionaryFilter(java.util.Set<Term> allowedTerms)
Creates a new
DictionaryFilter with a given set of allowed
terms. |
Modifier and Type | Method and Description |
---|---|
TermOccurrence |
filterTerm(TermOccurrence occurrence)
Takes a single term occurrence and filters that occurrence into a new
occurrence or returns null, indicating that the filter rejects that
term.
|
java.util.Set<Term> |
getAllowedTerms()
Gets the set of allowed terms.
|
void |
setAllowedTerms(java.util.Set<Term> allowedTerms)
Sets the set of allowed terms.
|
filterTerms
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
protected java.util.Set<Term> allowedTerms
public DictionaryFilter()
DictionaryFilter
with an empty set of allowed
terms.public DictionaryFilter(java.util.Set<Term> allowedTerms)
DictionaryFilter
with a given set of allowed
terms.allowedTerms
- The set of allowed terms.public TermOccurrence filterTerm(TermOccurrence occurrence)
SingleTermFilter
occurrence
- The term occurrence to filter.public java.util.Set<Term> getAllowedTerms()
public void setAllowedTerms(java.util.Set<Term> allowedTerms)
allowedTerms
- The set of allowed terms.