Class AbstractPrefixMap
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<CharSequence>
it.unimi.dsi.big.util.AbstractPrefixMap
- All Implemented Interfaces:
PrefixMap<MutableString>, StringMap<MutableString>, it.unimi.dsi.fastutil.Function<CharSequence, Long>, it.unimi.dsi.fastutil.objects.Object2LongFunction<CharSequence>, it.unimi.dsi.fastutil.Size64, Serializable, Function<CharSequence, Long>, ToLongFunction<CharSequence>
- Direct Known Subclasses:
ImmutableExternalPrefixMap, TernaryIntervalSearchTree
public abstract class AbstractPrefixMap
extends it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<CharSequence>
implements PrefixMap<MutableString>, Serializable
An abstract implementation of a prefix map.
This class provides the full services of a PrefixMap by implementing just
getInterval(CharSequence) and getTerm(long, MutableString)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> A cached view of the map as a list of mutable strings.protected it.unimi.dsi.fastutil.objects.AbstractObject2ObjectFunction<LongInterval, MutableString> A cached view of the map as a prefix map.protected it.unimi.dsi.fastutil.objects.Object2ObjectFunction<CharSequence, LongInterval> A cached view of the map as a range map.Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
defRetValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract LongIntervalgetInterval(CharSequence prefix) Returns the range of strings having a given prefix.protected abstract MutableStringgetTerm(long left, MutableString string) Writes a string specified by index into aMutableString.it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> list()Returns a list view of the domain of this string map (optional operation).it.unimi.dsi.fastutil.objects.Object2ObjectFunction<LongInterval, MutableString> Returns a function mapping ranges of strings to common prefixes (optional operation).it.unimi.dsi.fastutil.objects.Object2ObjectFunction<CharSequence, LongInterval> rangeMap()Returns a function mapping prefixes to ranges of strings.Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
defaultReturnValue, defaultReturnValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.Function
apply, clear, containsKeyMethods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsLong, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, defaultReturnValue, defaultReturnValue, get, getLong, getOrDefault, getOrDefault, put, put, remove, removeLongMethods inherited from interface it.unimi.dsi.fastutil.Size64
size
-
Field Details
-
rangeMap
A cached view of the map as a range map. -
prefixMap
protected it.unimi.dsi.fastutil.objects.AbstractObject2ObjectFunction<LongInterval, MutableString> prefixMapA cached view of the map as a prefix map. -
list
A cached view of the map as a list of mutable strings.
-
-
Constructor Details
-
AbstractPrefixMap
public AbstractPrefixMap()
-
-
Method Details
-
getInterval
Returns the range of strings having a given prefix.- Parameters:
prefix- a prefix.- Returns:
- the corresponding range of strings as an interval.
-
getTerm
Writes a string specified by index into aMutableString.- Parameters:
left- the index of a string.string- a mutable string.- Returns:
string.
-
rangeMap
Description copied from interface:PrefixMapReturns a function mapping prefixes to ranges of strings.- Specified by:
rangeMapin interfacePrefixMap<MutableString>- Returns:
- a function mapping prefixes to ranges of strings.
-
prefixMap
Description copied from interface:PrefixMapReturns a function mapping ranges of strings to common prefixes (optional operation).- Specified by:
prefixMapin interfacePrefixMap<MutableString>- Returns:
- a function mapping ranges of strings to common prefixes, or
nullif this map does not support prefixes.
-
list
Description copied from interface:StringMapReturns a list view of the domain of this string map (optional operation).Note that the list view acts as an inverse of the mapping implemented by this map.
- Specified by:
listin interfaceStringMap<MutableString>- Returns:
- a list view of the domain of this string map, or
nullif this map does not support this operation.
-