Class NameMultimap<V>

java.lang.Object
org.apache.calcite.util.NameMultimap<V>
Type Parameters:
V - Value type

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

    • NameMultimap

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

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • put

      public void put(String name, V v)
      Adds an entry to this multimap.
    • remove

      public boolean remove(String key, V value)
      Removes all entries that have the given case-sensitive key.
      Returns:
      Whether a value was removed
    • range

      public Collection<Map.Entry<String,V>> range(String name, boolean caseSensitive)
      Returns a map containing all the entries in this multimap that match the given name.
    • 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,List<V>> map()
      Returns the underlying map. Its size is the number of keys, not the number of values.