public interface TermIndex
Modifier and Type | Method and Description |
---|---|
IndexedTerm |
add(Term term)
Adds the given term to the index.
|
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 term)
Gets the index of the given term.
|
IndexedTerm |
getIndexedTerm(int index)
Gets the index-term pair for the given index.
|
IndexedTerm |
getIndexedTerm(Term term)
Gets the index-term pair for the given term, if it is in the index.
|
IndexedTerm |
getIndexedTerm(Termable term)
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.
|
int |
getTermCount()
Gets the number of terms.
|
java.util.List<? extends IndexedTerm> |
getTerms()
Gets all of the terms in the 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 term)
Determines if the index contains the given term.
|
int getTermCount()
java.util.List<? extends IndexedTerm> getTerms()
IndexedTerm getIndexedTerm(Termable term)
term
- The term to get the index-term pair for.IndexedTerm getIndexedTerm(Term term)
term
- The term to get the index-term pair for.IndexedTerm getIndexedTerm(int index)
index
- The index to get the index-term pair for.boolean hasIndexedTerm(IndexedTerm indexedTerm)
indexedTerm
- An index-term pair.boolean hasTerm(Termable term)
term
- The term.boolean hasTerm(Term term)
term
- The term.boolean hasIndex(int index)
index
- An index.int getIndex(Termable term)
term
- The term to get the index of.int getIndex(Term term)
term
- The term to get the index of.Term getTerm(int index)
index
- The index to get the term for.IndexedTerm add(Termable termable)
termable
- The term to add.IndexedTerm add(Term term)
term
- The term to add.void addAll(java.lang.Iterable<? extends Termable> terms)
terms
- The terms to add to the index.