|
|||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||
java.lang.Object | +--org.apache.commons.collections.SoftRefHashMap
HashMap with SoftReference links to values which allows the values of the Map
to be garbage collected by the JVM if it becomes low on memory.
Derive from this class and
override the factory method createReference() method to make
a Map wrapped in other types of Reference.
A synchronized version can be obtained with:
Collections.synchronizedMap( theMapToSynchronize )
WARNING the values() and entrySet() methods require optimisation
like the standard HashMap implementations so that iteration
over this Map is efficient.
| クラス java.util.Map から継承した内部クラス |
java.util.Map.Entry |
| コンストラクタの概要 | |
SoftRefHashMap()
|
|
| メソッドの概要 | |
void |
clear()
Clears all mappings |
boolean |
containsKey(java.lang.Object key)
Answers whether the argument is in the domain of the mappings |
boolean |
containsValue(java.lang.Object value)
Answers whether the argument is a Referenced value |
java.util.Set |
entrySet()
Returns a set view of the mappings in the wrapped map |
boolean |
equals(java.lang.Object object)
Answers whether this map and the argument are 'the same' |
java.lang.Object |
get(java.lang.Object key)
Retrieves the referent of the Referenced value |
int |
hashCode()
Calculates the hash code for this map |
boolean |
isEmpty()
Answers whether there are any mappings |
java.util.Set |
keySet()
Returns the domain of the mappings |
void |
purge()
Removes References that have had their referents garbage collected |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Adds a key-value mapping, wrapping the value in a Reference |
void |
putAll(java.util.Map map)
Put all of the mappings in the argument into this wrapped map |
java.lang.Object |
remove(java.lang.Object key)
Removes a mapping from this map |
int |
size()
Returns the number of mappings in this map |
java.util.Collection |
values()
Returns a collection of the Referenced values |
| クラス java.lang.Object から継承したメソッド |
getClass, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public SoftRefHashMap()
| メソッドの詳細 |
public void clear()
java.util.Map 内の clearpublic boolean containsKey(java.lang.Object key)
java.util.Map 内の containsKeypublic boolean containsValue(java.lang.Object value)
java.util.Map 内の containsValuepublic java.util.Set entrySet()
java.util.Map 内の entrySetpublic boolean equals(java.lang.Object object)
java.util.Map 内の equalsjava.lang.Object 内の equalspublic java.lang.Object get(java.lang.Object key)
java.util.Map 内の getkey - The key with which to retrieve the valuepublic int hashCode()
java.util.Map 内の hashCodejava.lang.Object 内の hashCodepublic boolean isEmpty()
java.util.Map 内の isEmptypublic java.util.Set keySet()
java.util.Map 内の keySetpublic void purge()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
java.util.Map 内の putpublic void putAll(java.util.Map map)
java.util.Map 内の putAllpublic java.lang.Object remove(java.lang.Object key)
java.util.Map 内の removepublic int size()
java.util.Map 内の sizepublic java.util.Collection values()
java.util.Map 内の values
|
|||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||