| it.unimi.dsi.mg4j.index.TermMap
All known Subclasses: it.unimi.dsi.mg4j.util.TernaryIntervalSearchTree, it.unimi.dsi.mg4j.util.ImmutableTriePrefixTree, it.unimi.dsi.mg4j.index.AbstractTermMap, it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary,
TermMap | public interface TermMap (Code) | | A map from terms to numbers (and possibly viceversa).
The possibility of retrieving terms can be checked for by calling
TermMap.hasTerms() .
author: Sebastiano Vigna since: 0.9.2StringMap |
Method Summary | |
public int | getNumber(CharSequence term) Returns the ordinal number corresponding to the given term, or possibly (but not necessarily) -1 if the term was not indexed.
We intentionally prefer “ordinal number” to “index” because of the obvious
confusion that the latter term can cause.
Parameters: term - a term. | public CharSequence | getTerm(int number) Returns the term corresponding to the given ordinal number (optional operation).
Parameters: number - a term ordinal number. | public MutableString | getTerm(int number, MutableString term) Writes in the given mutable string the term corresponding to the given ordinal number (optional operation).
Parameters: number - a term ordinal number. Parameters: term - a mutable string that will be filled with the corresponding term. | public boolean | hasTerms() Returns true if this prefix map supports
. | public int | size() Returns the number of terms in this term map. |
getNumber | public int getNumber(CharSequence term)(Code) | | Returns the ordinal number corresponding to the given term, or possibly (but not necessarily) -1 if the term was not indexed.
We intentionally prefer “ordinal number” to “index” because of the obvious
confusion that the latter term can cause.
Parameters: term - a term. its ordinal number, or possibly (but not necessarily) -1 if the term was not indexed. |
getTerm | public CharSequence getTerm(int number)(Code) | | Returns the term corresponding to the given ordinal number (optional operation).
Parameters: number - a term ordinal number. the corresponding term, or possibly (but not necessarily) null if the term was not indexed. |
getTerm | public MutableString getTerm(int number, MutableString term)(Code) | | Writes in the given mutable string the term corresponding to the given ordinal number (optional operation).
Parameters: number - a term ordinal number. Parameters: term - a mutable string that will be filled with the corresponding term. term , or possibly (but not necessarily) null if the term was not indexed. |
hasTerms | public boolean hasTerms()(Code) | | Returns true if this prefix map supports
.
true if this prefix map supports . |
size | public int size()(Code) | | Returns the number of terms in this term map.
the number of terms in this term map. |
|
|