it.unimi.dsi.mg4j.index
Class AbstractTermMap

java.lang.Object
  extended by it.unimi.dsi.mg4j.index.AbstractTermMap
All Implemented Interfaces:
TermMap
Direct Known Subclasses:
MinimalPerfectHash

Deprecated. Use StringMap and related classes.

@Deprecated
public abstract class AbstractTermMap
extends Object
implements TermMap

An abstract implementation of a map from term to term indices.

Subclasses need just to implement TermMap.getNumber(CharSequence) (and, possibly, getTerm(int)).

Since:
0.9
Author:
Sebastiano Vigna

Constructor Summary
AbstractTermMap()
          Deprecated.  
 
Method Summary
 int getIndex(CharSequence term)
          Deprecated. 
 CharSequence getTerm(int index)
          Deprecated. Returns the term corresponding to the given ordinal number (optional operation).
 MutableString getTerm(int index, MutableString term)
          Deprecated. Writes in the given mutable string the term corresponding to the given ordinal number (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.mg4j.index.TermMap
getNumber, hasTerms, size
 

Constructor Detail

AbstractTermMap

public AbstractTermMap()
Deprecated. 
Method Detail

getIndex

@Deprecated
public int getIndex(CharSequence term)
Deprecated. 


getTerm

public CharSequence getTerm(int index)
Deprecated. 
Description copied from interface: TermMap
Returns the term corresponding to the given ordinal number (optional operation).

Specified by:
getTerm in interface TermMap
Parameters:
index - a term ordinal number.
Returns:
the corresponding term, or possibly (but not necessarily) null if the term was not indexed.

getTerm

public MutableString getTerm(int index,
                             MutableString term)
Deprecated. 
Description copied from interface: TermMap
Writes in the given mutable string the term corresponding to the given ordinal number (optional operation).

Specified by:
getTerm in interface TermMap
Parameters:
index - a term ordinal number.
term - a mutable string that will be filled with the corresponding term.
Returns:
term, or possibly (but not necessarily) null if the term was not indexed.