Interface StringMap<S extends java.lang.CharSequence>
-
- All Superinterfaces:
it.unimi.dsi.fastutil.Function<java.lang.CharSequence,java.lang.Long>
,java.util.function.Function<java.lang.CharSequence,java.lang.Long>
,it.unimi.dsi.fastutil.objects.Object2LongFunction<java.lang.CharSequence>
,java.io.Serializable
,java.util.function.ToLongFunction<java.lang.CharSequence>
- All Known Subinterfaces:
PrefixMap<S>
- All Known Implementing Classes:
AbstractPrefixMap
,ImmutableExternalPrefixMap
,LiterallySignedStringMap
,ShiftAddXorSignedStringMap
,StringMaps.SynchronizedPrefixMap
,StringMaps.SynchronizedStringMap
,TernaryIntervalSearchTree
public interface StringMap<S extends java.lang.CharSequence> extends it.unimi.dsi.fastutil.objects.Object2LongFunction<java.lang.CharSequence>, java.io.Serializable
A map from strings to numbers (and possibly vice versa).String maps represent mappings from strings (actually, any subclass of
CharSequence
) to numbers; they can support reverse mapping, too. The latter has usually sense only if the map is minimal and perfect (e.g., a bijection of a set of string with an initial segment of the natural numbers of the same size). String maps are useful for terms of an MG4J inverted index, URLs of a WebGraph-compressed web snapshot, and so on.Warning: the return value of
list()
is afastutil
ObjectList
. This in principle is not sensible, as string maps return longs (they extendObject2LongFunction
), andObjectList
has only integer index support. If you need long indices, please consider usingStringMap
.- Since:
- 0.2
- Author:
- Sebastiano Vigna
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description it.unimi.dsi.fastutil.objects.ObjectList<? extends S>
list()
Returns a list view of the domain of this string map (optional operation).-
Methods 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, removeLong
-
-
-
-
Method Detail
-
list
it.unimi.dsi.fastutil.objects.ObjectList<? extends S> list()
Returns 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.
- Returns:
- a list view of the domain of this string map, or
null
if this map does not support this operation.
-
-