it.unimi.dsi.mg4j.index
Class TermMaps.SynchronizedTermPrefixMap
java.lang.Object
it.unimi.dsi.mg4j.index.TermMaps.SynchronizedTermMap
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
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 |
TermMaps.SynchronizedTermPrefixMap
public TermMaps.SynchronizedTermPrefixMap(Object termPrefixMap)
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.