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.HashMap 继承的方法 |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
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.