|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PrefixMap<S extends CharSequence>
A map from prefixes to string intervals (and possibly vice versa).
Instances of this class provide the services of a StringMap
, but by assuming
the strings are lexicographically ordered, they can provide further information by
exposing a function from string prefixes to intervals and a
function from intervals to string prefixes.
In the first case, given a prefix, we can ask for the range of strings starting
with that prefix, expressed as a LongInterval
. This information is very useful to
satisfy prefix queries (e.g., monitor*) with a brute-force approach.
Optionally, a prefix map may provide the opposite service: given an interval of terms, it
may provide the maximum common prefix. This feature can be checked for by calling
prefixMap()
.
Method Summary | |
---|---|
Object2ObjectFunction<LongInterval,S> |
prefixMap()
Returns a function mapping ranges of strings to common prefixes (optional operation). |
Object2ObjectFunction<CharSequence,LongInterval> |
rangeMap()
Returns a function mapping prefixes to ranges of strings. |
Methods inherited from interface it.unimi.dsi.big.util.StringMap |
---|
list |
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction |
---|
defaultReturnValue, defaultReturnValue, getLong, put, removeLong |
Methods inherited from interface it.unimi.dsi.fastutil.Function |
---|
clear, containsKey, get, put, remove, size |
Methods inherited from interface it.unimi.dsi.fastutil.Size64 |
---|
size, size64 |
Method Detail |
---|
Object2ObjectFunction<CharSequence,LongInterval> rangeMap()
Object2ObjectFunction<LongInterval,S> prefixMap()
null
if this
map does not support prefixes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |