Class NameMap<V>

Type Parameters:
V - Value type

public class NameMap<V> extends Object
Map whose keys are names and can be accessed with and without case sensitivity.
  • Constructor Details

    • NameMap

      public NameMap()
      Creates a NameMap, initially empty.
  • Method Details

    • toString

      public String toString()
      toString in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      equals in class Object
    • immutableCopyOf

      public static <V> NameMap<V> immutableCopyOf(Map<String,V> names)
      Creates a NameMap that is an immutable copy of a given map.
    • put

      public void put(String name, V v)
    • range

      public NavigableMap<String,V> range(String name, boolean caseSensitive)
      Returns a map containing all the entries in the map that match the given name. If case-sensitive, that map will have 0 or 1 elements; if case-insensitive, it may have 0 or more.
    • containsKey

      public boolean containsKey(String name, boolean caseSensitive)
      Returns whether this map contains a given key, with a given case-sensitivity.
    • map

      public NavigableMap<String,V> map()
      Returns the underlying map.
    • remove

      public @Nullable V remove(String key)