|
|||||
前のクラス 次のクラス | フレームあり フレームなし | ||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
内の clear
public boolean containsKey(java.lang.Object key)
java.util.Map
内の containsKey
public boolean containsValue(java.lang.Object value)
java.util.Map
内の containsValue
public java.util.Set entrySet()
java.util.Map
内の entrySet
public boolean equals(java.lang.Object object)
java.util.Map
内の equals
java.lang.Object
内の equals
public java.lang.Object get(java.lang.Object key)
java.util.Map
内の get
key
- The key with which to retrieve the valuepublic int hashCode()
java.util.Map
内の hashCode
java.lang.Object
内の hashCode
public boolean isEmpty()
java.util.Map
内の isEmpty
public java.util.Set keySet()
java.util.Map
内の keySet
public void purge()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
java.util.Map
内の put
public void putAll(java.util.Map map)
java.util.Map
内の putAll
public java.lang.Object remove(java.lang.Object key)
java.util.Map
内の remove
public int size()
java.util.Map
内の size
public java.util.Collection values()
java.util.Map
内の values
|
|||||
前のクラス 次のクラス | フレームあり フレームなし | ||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |