com.jdon.util
类 MultiHashMap

java.lang.Object
  继承者 java.util.AbstractMap<K,V>
      继承者 java.util.HashMap
          继承者 com.jdon.util.MultiHashMap
所有已实现的接口:
Serializable, Cloneable, Map

public class MultiHashMap
extends HashMap

MultiHashMap is a extension java.util.HashMap.It is usde if following condition.
Sometime, a value shoud be determinated by key and subkey.

另请参见:
序列化表格

嵌套类摘要
 
从类 java.util.AbstractMap 继承的嵌套类/接口
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
构造方法摘要
MultiHashMap()
           
 
方法摘要
 Object get(Object key, Object subKey)
          Returns the value to which this map maps the specified key and subKey.
 Set getSubKeys(Object key)
           
 Object put(Object key, Object subKey, Object value)
          Associates the specified value with the specified key and subKey in this map.
 
从类 java.util.HashMap 继承的方法
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
从类 java.util.AbstractMap 继承的方法
equals, hashCode, toString
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 java.util.Map 继承的方法
equals, hashCode
 

构造方法详细信息

MultiHashMap

public MultiHashMap()
方法详细信息

put

public Object put(Object key,
                  Object subKey,
                  Object value)
Associates the specified value with the specified key and subKey in this map. If the map previously contained a mapping for this key and subKey , the old value is replaced.

参数:
key - Is a Primary key.
subKey - with which the specified value is to be associated.
value - to be associated with the specified key and subKey
返回:
previous value associated with specified key and subKey, or null if there was no mapping for key and subKey. A null return can also indicate that the HashMap previously associated null with the specified key and subKey.

get

public Object get(Object key,
                  Object subKey)
Returns the value to which this map maps the specified key and subKey. Returns null if the map contains no mapping for this key and subKey. A return value of null does not necessarily indicate that the map contains no mapping for the key and subKey; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

参数:
key - whose associated value is to be returned.
subKey - whose associated value is to be returned
返回:
the value to which this map maps the specified key.

getSubKeys

public Set getSubKeys(Object key)


Copyright © 2013. All Rights Reserved.