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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedStringMap(StringMap<S> stringMap)
-
Method Summary
Modifier and Type Method Description voidclear()booleancontainsKey(Object key)longdefaultReturnValue()voiddefaultReturnValue(long rv)Longget(Object key)longgetLong(Object s)ObjectList<? extends S>list()Returns a list view of the domain of this string map (optional operation).longput(CharSequence key, long value)Longput(CharSequence key, Long value)Longremove(Object key)longremoveLong(Object key)intsize()-
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
applyAsLong
-
-
-
-
Field Detail
-
stringMap
protected final StringMap<S extends CharSequence> stringMap
-
list
protected ObjectList<? extends S extends CharSequence> list
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceFunction<CharSequence,Long>
-
list
public ObjectList<? extends S> 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<S extends CharSequence>- Returns:
- a list view of the domain of this string map, or
nullif this map does not support this operation.
-
getLong
public long getLong(Object s)
- Specified by:
getLongin interfaceObject2LongFunction<S extends CharSequence>
-
get
public Long get(Object key)
- Specified by:
getin interfaceFunction<CharSequence,Long>- Specified by:
getin interfaceObject2LongFunction<S extends CharSequence>
-
put
public long put(CharSequence key, long value)
- Specified by:
putin interfaceObject2LongFunction<S extends CharSequence>
-
put
public Long put(CharSequence key, Long value)
- Specified by:
putin interfaceFunction<CharSequence,Long>- Specified by:
putin interfaceObject2LongFunction<S extends CharSequence>
-
remove
public Long remove(Object key)
- Specified by:
removein interfaceFunction<CharSequence,Long>- Specified by:
removein interfaceObject2LongFunction<S extends CharSequence>
-
removeLong
public long removeLong(Object key)
- Specified by:
removeLongin interfaceObject2LongFunction<S extends CharSequence>
-
clear
public void clear()
- Specified by:
clearin interfaceFunction<CharSequence,Long>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceFunction<CharSequence,Long>
-
defaultReturnValue
public long defaultReturnValue()
- Specified by:
defaultReturnValuein interfaceObject2LongFunction<S extends CharSequence>
-
defaultReturnValue
public void defaultReturnValue(long rv)
- Specified by:
defaultReturnValuein interfaceObject2LongFunction<S extends CharSequence>
-
-