it.unimi.dsi.mg4j.index
Class TermMaps.SynchronizedTermPrefixMap

java.lang.Object
  extended by it.unimi.dsi.mg4j.index.TermMaps.SynchronizedTermMap
      extended by it.unimi.dsi.mg4j.index.TermMaps.SynchronizedTermPrefixMap
All Implemented Interfaces:
PrefixMap, TermMap, Serializable
Enclosing class:
TermMaps

protected static class TermMaps.SynchronizedTermPrefixMap
extends TermMaps.SynchronizedTermMap
implements PrefixMap

See Also:
Serialized Form

Field Summary
 
Fields inherited from class it.unimi.dsi.mg4j.index.TermMaps.SynchronizedTermMap
termMap
 
Constructor Summary
TermMaps.SynchronizedTermPrefixMap(Object termPrefixMap)
           
 
Method Summary
 Interval getInterval(CharSequence prefix)
          Returns the interval of terms starting with the given prefix.
 CharSequence getPrefix(Interval interval)
          Returns the maximum prefix common to all terms in the given nonempty interval (optional operation).
 MutableString getPrefix(Interval interval, MutableString prefix)
          Writes in the given mutable string the maximum prefix common to all terms in the given nonempty interval (optional operation).
 boolean hasPrefixes()
          Returns true if this prefix map supports prefix retrieval.
 
Methods inherited from class it.unimi.dsi.mg4j.index.TermMaps.SynchronizedTermMap
getNumber, getTerm, getTerm, hasTerms, size
 
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.PrefixMap
size
 

Constructor Detail

TermMaps.SynchronizedTermPrefixMap

public TermMaps.SynchronizedTermPrefixMap(Object termPrefixMap)
Method Detail

getInterval

public Interval getInterval(CharSequence prefix)
Description copied from interface: PrefixMap
Returns the interval of terms starting with the given prefix.

Specified by:
getInterval in interface PrefixMap
Parameters:
prefix - a prefix.
Returns:
the interval of terms starting with prefix (Intervals.EMPTY_INTERVAL in case no term starts with prefix).

getPrefix

public MutableString getPrefix(Interval interval,
                               MutableString prefix)
Description copied from interface: PrefixMap
Writes in the given mutable string the maximum prefix common to all terms in the given nonempty interval (optional operation).

Specified by:
getPrefix in interface PrefixMap
Parameters:
interval - an interval.
prefix - a mutable string that will be filled with the maximum prefix common to all terms in the given nonempty interval.
Returns:
prefix.

getPrefix

public CharSequence getPrefix(Interval interval)
Description copied from interface: PrefixMap
Returns the maximum prefix common to all terms in the given nonempty interval (optional operation).

Specified by:
getPrefix in interface PrefixMap
Parameters:
interval - an interval.
Returns:
the maximum prefix common to all terms in the given nonempty interval.

hasPrefixes

public boolean hasPrefixes()
Description copied from interface: PrefixMap
Returns true if this prefix map supports prefix retrieval.

Specified by:
hasPrefixes in interface PrefixMap
Returns:
true if this prefix map supports prefix retrieval.