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.
|
cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, getIndexedTerm, getIndexedTerm, getTermCount, getTermspublic IndexedTerm getIndexedTerm(Termable termable)
TermIndexgetIndexedTerm in interface TermIndextermable - The term to get the index-term pair for.public boolean hasIndexedTerm(IndexedTerm indexedTerm)
TermIndexhasIndexedTerm in interface TermIndexindexedTerm - An index-term pair.public boolean hasTerm(Termable termable)
TermIndexpublic boolean hasTerm(Term term)
TermIndexpublic boolean hasIndex(int index)
TermIndexpublic int getIndex(Termable termable)
TermIndexpublic int getIndex(Term term)
TermIndexpublic Term getTerm(int index)
TermIndexpublic IndexedTerm add(Termable termable)
TermIndex