public abstract class AbstractTermIndex extends AbstractCloneableSerializable implements TermIndex
TermIndex
class that handles a lot
of the convenience method implementations.Constructor and Description |
---|
AbstractTermIndex()
Creates a new
AbstractTermIndex . |
Modifier and Type | Method and Description |
---|---|
IndexedTerm |
add(Termable termable)
Adds the given term to the index.
|
void |
addAll(java.lang.Iterable<? extends Termable> terms)
Adds all of the given terms to the index, if they are not already part
of it.
|
int |
getIndex(Term term)
Gets the index of the given term.
|
int |
getIndex(Termable termable)
Gets the index of the given term.
|
IndexedTerm |
getIndexedTerm(Termable termable)
Gets the index-term pair for the given term, if it is in the index.
|
Term |
getTerm(int index)
Gets the term associated with the given index.
|
boolean |
hasIndex(int index)
Determines if the term index contains the given index.
|
boolean |
hasIndexedTerm(IndexedTerm indexedTerm)
Determines if the given indexed term matches the term at the given index
value in this term index.
|
boolean |
hasTerm(Term term)
Determines if the index contains the given term.
|
boolean |
hasTerm(Termable termable)
Determines if the index contains the given term.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, getIndexedTerm, getIndexedTerm, getTermCount, getTerms
public IndexedTerm getIndexedTerm(Termable termable)
TermIndex
getIndexedTerm
in interface TermIndex
termable
- The term to get the index-term pair for.public boolean hasIndexedTerm(IndexedTerm indexedTerm)
TermIndex
hasIndexedTerm
in interface TermIndex
indexedTerm
- An index-term pair.public boolean hasTerm(Termable termable)
TermIndex
public boolean hasTerm(Term term)
TermIndex
public boolean hasIndex(int index)
TermIndex
public int getIndex(Termable termable)
TermIndex
public int getIndex(Term term)
TermIndex
public Term getTerm(int index)
TermIndex
public IndexedTerm add(Termable termable)
TermIndex