Class MapOfMaps<K,​V,​W>

java.lang.Object
games.stendhal.server.util.MapOfMaps<K,​V,​W>
Type Parameters:
K - type of primary key
V - type of secondary key
W - type of value
All Implemented Interfaces:
Map<K,​Map<V,​W>>

public class MapOfMaps<K,​V,​W> extends Object implements Map<K,​Map<V,​W>>
A Map which contains maps
Author:
hendrik
  • Constructor Details

    • MapOfMaps

      public MapOfMaps()
  • Method Details

    • clear

      public void clear()
      Specified by:
      clear in interface Map<K,​V>
    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface Map<K,​V>
    • containsValue

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<K,​V>
    • entrySet

      public Set<Map.Entry<K,​Map<V,​W>>> entrySet()
      Specified by:
      entrySet in interface Map<K,​V>
    • get

      public Map<V,​W> get(Object key)
      Specified by:
      get in interface Map<K,​V>
    • get

      public W get(Object key, Object subKey)
      gets a value
      Parameters:
      key - key
      subKey - sub key
      Returns:
      value
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<K,​V>
    • keySet

      public Set<K> keySet()
      Specified by:
      keySet in interface Map<K,​V>
    • put

      public Map<V,​W> put(K key, Map<V,​W> value)
      Specified by:
      put in interface Map<K,​V>
    • putAll

      public void putAll(Map<? extends K,​? extends Map<V,​W>> m)
      Specified by:
      putAll in interface Map<K,​V>
    • remove

      public Map<V,​W> remove(Object key)
      Specified by:
      remove in interface Map<K,​V>
    • size

      public int size()
      Specified by:
      size in interface Map<K,​V>
    • values

      public Collection<Map<V,​W>> values()
      Specified by:
      values in interface Map<K,​V>
    • toString

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

      public W put(K key, V subKey, W value)
      adds an entry to the map
      Parameters:
      key - primary key
      subKey - secondary key
      value - value
      Returns:
      old value