Class StringMaps

java.lang.Object
it.unimi.dsi.big.util.StringMaps

public class StringMaps extends Object
A class providing static methods and objects that do useful things with string maps and prefix maps.
Since:
2.0
Author:
Sebastiano Vigna
See Also:
  • Method Details

    • 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.
    • wrap

      public static <T extends CharSequence> StringMap<T> wrap(StringMap<T> stringMap)
      Returns an immutable (big) StringMap view of a standard StringMap.
      Parameters:
      stringMap - a string map.
      Returns:
      a StringMap view of stringMap.
    • wrap

      public static <T extends CharSequence> PrefixMap<T> wrap(PrefixMap<T> prefixMap)
      Returns an immutable (big) PrefixMap view of a standard PrefixMap. Note that the returned prefix map does not implement PrefixMap.prefixMap().
      Parameters:
      prefixMap - a prefix map.
      Returns:
      a PrefixMap view of prefixMap.