|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<CharSequence>
it.unimi.dsi.util.AbstractPrefixMap
public abstract class AbstractPrefixMap
An abstract implementation of a prefix map.
This class provides the full serives of a PrefixMap
by implementing just
getInterval(CharSequence)
and getTerm(int, MutableString)
Field Summary | |
---|---|
protected ObjectList<MutableString> |
list
|
protected Object2ObjectFunction<Interval,MutableString> |
prefixMap
|
protected Object2ObjectFunction<CharSequence,Interval> |
rangeMap
|
Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction |
---|
defRetValue |
Constructor Summary | |
---|---|
AbstractPrefixMap()
|
Method Summary | |
---|---|
protected abstract Interval |
getInterval(CharSequence prefix)
Returns the range of strings having a given prefix. |
protected abstract MutableString |
getTerm(int index,
MutableString string)
Writes a string specified by index into a MutableString . |
ObjectList<MutableString> |
list()
Returns a list view of the domain of this string map (optional operation). |
Object2ObjectFunction<Interval,MutableString> |
prefixMap()
Returns a function mapping ranges of strings to common prefixes (optional operation). |
Object2ObjectFunction<CharSequence,Interval> |
rangeMap()
Returns a function mapping prefixes to ranges of strings. |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction |
---|
clear, defaultReturnValue, defaultReturnValue, get, put, put, remove, removeLong |
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.fastutil.objects.Object2LongFunction |
---|
defaultReturnValue, defaultReturnValue, getLong, put, removeLong |
Methods inherited from interface it.unimi.dsi.fastutil.Function |
---|
clear, containsKey, get, put, remove, size |
Field Detail |
---|
protected Object2ObjectFunction<CharSequence,Interval> rangeMap
protected Object2ObjectFunction<Interval,MutableString> prefixMap
protected ObjectList<MutableString> list
Constructor Detail |
---|
public AbstractPrefixMap()
Method Detail |
---|
protected abstract Interval getInterval(CharSequence prefix)
prefix
- a prefix.
protected abstract MutableString getTerm(int index, MutableString string)
MutableString
.
index
- the index of a string.string
- a mutable string.
string
.public Object2ObjectFunction<CharSequence,Interval> rangeMap()
PrefixMap
rangeMap
in interface PrefixMap<MutableString>
public Object2ObjectFunction<Interval,MutableString> prefixMap()
PrefixMap
prefixMap
in interface PrefixMap<MutableString>
null
if this
map does not support prefixes.public ObjectList<MutableString> list()
StringMap
Note that the list view acts as an inverse of the mapping implemented by this map.
list
in interface StringMap<MutableString>
null
if this map does
not support this operation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |