public final class SoftValueMap
extends java.lang.Object
implements java.util.Map
| 构造器和说明 |
|---|
SoftValueMap()
Equivalent to
SoftValueMap(1, 1). |
SoftValueMap(int initialCapacity,
float loadFactor,
int readClearCheckFrequency,
int writeClearCheckFrequency)
Constructs a SoftValueMap with specified initial capacity, load factor,
and cleared value removal frequencies.
|
SoftValueMap(int readClearCheckFrequency,
int writeClearCheckFrequency)
Equivalent to
SoftValueMap(11, 0.75F, getClearCheckFrequency, putClearCheckFrequency). |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set |
entrySet() |
boolean |
equals(java.lang.Object rhs) |
java.lang.Object |
get(java.lang.Object key)
Returns the value that is mapped to a given 'key'.
|
int |
hashCode() |
boolean |
isEmpty()
Returns 'false' is this map contains key-value mappings (even if some of
the values may have been cleared already but not removed from the table).
|
java.util.Set |
keySet() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Updates the table to map 'key' to 'value'.
|
void |
putAll(java.util.Map map) |
java.lang.Object |
remove(java.lang.Object key) |
int |
size()
Returns the number of key-value mappings in this map.
|
java.lang.String |
toString()
Overrides Object.toString() for debug purposes.
|
java.util.Collection |
values() |
public SoftValueMap()
SoftValueMap(1, 1).public SoftValueMap(int readClearCheckFrequency,
int writeClearCheckFrequency)
SoftValueMap(11, 0.75F, getClearCheckFrequency, putClearCheckFrequency).public SoftValueMap(int initialCapacity,
float loadFactor,
int readClearCheckFrequency,
int writeClearCheckFrequency)
initialCapacity - initial number of hash buckets in the table
[may not be negative, 0 is equivalent to 1].loadFactor - the load factor to use to determine rehashing points
[must be in (0.0, 1.0] range].readClearCheckFrequency - specifies that every readClearCheckFrequency
get(java.lang.Object) should check for and remove all mappings whose soft values
have been cleared by the garbage collector [may not be less than 1].writeClearCheckFrequency - specifies that every writeClearCheckFrequency
put(java.lang.Object, java.lang.Object) should check for and remove all mappings whose soft values
have been cleared by the garbage collector [may not be less than 1].public boolean equals(java.lang.Object rhs)
equals 在接口中 java.util.Mapequals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在接口中 java.util.MaphashCode 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.Objectpublic int size()
NOTE: in contrast with the java.util.WeakHashMap implementation, this is a constant time operation.
size 在接口中 java.util.Mappublic boolean isEmpty()
NOTE: in contrast with the java.util.WeakHashMap implementation, this is a constant time operation.
isEmpty 在接口中 java.util.Mappublic java.lang.Object get(java.lang.Object key)
get 在接口中 java.util.Mapkey - mapping key [may not be null].public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put 在接口中 java.util.Mapkey - mapping key [may not be null].value - mapping value [may not be null].public java.lang.Object remove(java.lang.Object key)
remove 在接口中 java.util.Mappublic void clear()
clear 在接口中 java.util.Mappublic boolean containsKey(java.lang.Object key)
containsKey 在接口中 java.util.Mappublic boolean containsValue(java.lang.Object value)
containsValue 在接口中 java.util.Mappublic void putAll(java.util.Map map)
putAll 在接口中 java.util.Mappublic java.util.Set keySet()
keySet 在接口中 java.util.Mappublic java.util.Set entrySet()
entrySet 在接口中 java.util.Mappublic java.util.Collection values()
values 在接口中 java.util.MapCopyright © 2018. All Rights Reserved.