it.unimi.dsi.util
Class StringMaps

java.lang.Object
  extended by it.unimi.dsi.util.StringMaps

public class StringMaps
extends Object

A class providing static methods and objects that do useful things with string maps and prefix maps.

Author:
Sebastiano Vigna
See Also:
StringMaps.SynchronizedStringMap, PrefixMap

Nested Class Summary
protected static class StringMaps.SynchronizedPrefixMap<S extends CharSequence>
           
protected static class StringMaps.SynchronizedStringMap<S extends CharSequence>
           
 
Method Summary
static
<T extends CharSequence>
PrefixMap<T>
synchronize(PrefixMap<T> prefixMap)
          Returns a synchronized prefix map backed by the given prefix map.
static
<T extends CharSequence>
StringMap<T>
synchronize(StringMap<T> stringMap)
          Returns a synchronized string map backed by the given string map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

synchronize

public static <T extends CharSequence> StringMap<T> synchronize(StringMap<T> stringMap)
Returns a synchronized string map backed by the given string map.

Parameters:
stringMap - the string map to be wrapped in a synchronized map.
Returns:
a synchronized view of the specified string map.

synchronize

public static <T extends CharSequence> PrefixMap<T> synchronize(PrefixMap<T> prefixMap)
Returns a synchronized prefix map backed by the given prefix map.

Parameters:
prefixMap - the prefix map to be wrapped in a synchronized map.
Returns:
a synchronized view of the specified prefix map.