Package it.unimi.dsi.util
Class StringMaps.SynchronizedStringMap<S extends CharSequence>
java.lang.Object
it.unimi.dsi.util.StringMaps.SynchronizedStringMap<S>
- All Implemented Interfaces:
Function<CharSequence,
,Long> Object2LongFunction<CharSequence>
,StringMap<S>
,Serializable
,Function<CharSequence,
,Long> ToLongFunction<CharSequence>
- Direct Known Subclasses:
StringMaps.SynchronizedPrefixMap
- Enclosing class:
- StringMaps
protected static class StringMaps.SynchronizedStringMap<S extends CharSequence>
extends Object
implements StringMap<S>, Serializable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) long
void
defaultReturnValue
(long rv) long
ObjectList<? extends S>
list()
Returns a list view of the domain of this string map (optional operation).long
put
(CharSequence key, long value) put
(CharSequence key, Long value) long
removeLong
(Object key) int
size()
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
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsLong, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, getOrDefault, getOrDefault
-
Field Details
-
stringMap
-
list
-
-
Constructor Details
-
SynchronizedStringMap
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceFunction<CharSequence,
Long>
-
list
Description copied from interface:StringMap
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.
- Specified by:
list
in interfaceStringMap<S extends CharSequence>
- Returns:
- a list view of the domain of this string map, or
null
if this map does not support this operation.
-
getLong
- Specified by:
getLong
in interfaceObject2LongFunction<S extends CharSequence>
-
get
- Specified by:
get
in interfaceFunction<CharSequence,
Long> - Specified by:
get
in interfaceObject2LongFunction<S extends CharSequence>
-
put
- Specified by:
put
in interfaceObject2LongFunction<S extends CharSequence>
-
put
- Specified by:
put
in interfaceFunction<CharSequence,
Long> - Specified by:
put
in interfaceObject2LongFunction<S extends CharSequence>
-
remove
- Specified by:
remove
in interfaceFunction<CharSequence,
Long> - Specified by:
remove
in interfaceObject2LongFunction<S extends CharSequence>
-
removeLong
- Specified by:
removeLong
in interfaceObject2LongFunction<S extends CharSequence>
-
clear
public void clear()- Specified by:
clear
in interfaceFunction<CharSequence,
Long>
-
containsKey
- Specified by:
containsKey
in interfaceFunction<CharSequence,
Long>
-
defaultReturnValue
public long defaultReturnValue()- Specified by:
defaultReturnValue
in interfaceObject2LongFunction<S extends CharSequence>
-
defaultReturnValue
public void defaultReturnValue(long rv) - Specified by:
defaultReturnValue
in interfaceObject2LongFunction<S extends CharSequence>
-