Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.util
Class Maps.SoftHashMap<K,V>

java.lang.Object
  extended by oracle.javatools.util.Maps.AbstractHashMap<K,V,Maps.SoftEntry<K,V>>
      extended by oracle.javatools.util.Maps.SoftHashMap<K,V>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
Enclosing class:
Maps

public static class Maps.SoftHashMap<K,V>
extends Maps.AbstractHashMap<K,V,Maps.SoftEntry<K,V>>

An implementation of Maps.AbstractHashMap, based on Maps.SoftEntry, which holds its values with SoftReferences.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class oracle.javatools.util.Maps.AbstractHashMap
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY
 
Constructor Summary
Maps.SoftHashMap()
          Constructs an empty soft-referencing map with default capacity and load factor.
Maps.SoftHashMap(int initialCapacity)
          Constructs an empty soft-referencing map with specified initial capacity and default load factor.
Maps.SoftHashMap(int initialCapacity, float loadFactor)
          Constructs an empty soft-referencing map with specified initial capacity and load factor.
Maps.SoftHashMap(java.util.Map<? extends K,? extends V> map)
          Constructs a soft-referencing map with specified initial mappings, initial capacity based on the number of initial mappings, and default load factor.
 
Method Summary
protected  Maps.SoftEntry<K,V> createEntry(int hash, K key, V value, Maps.SoftEntry<K,V> next)
          Creates an entry for this map.
 
Methods inherited from class oracle.javatools.util.Maps.AbstractHashMap
addEntry, capacity, change, clear, clone, containsKey, containsValue, createEntryIterator, createEntrySetIterator, createKeySetIterator, createValuesIterator, entryAccessed, entryAdded, entryChanged, entryPurged, entryRemoved, entrySet, equals, get, getChangeCount, getEntry, getQueue, hashCode, isEmpty, keyEquals, keyHashCode, keySet, loadFactor, mapChanged, mapConstructed, mapInitialized, purge, purgeEntry, put, putAll, remove, removeExistingEntry, removeKey, size, toString, valueEquals, valueHashCode, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Maps.SoftHashMap

public Maps.SoftHashMap()
Constructs an empty soft-referencing map with default capacity and load factor.

See Also:
Maps.AbstractHashMap.DEFAULT_INITIAL_CAPACITY, Maps.AbstractHashMap.DEFAULT_LOAD_FACTOR

Maps.SoftHashMap

public Maps.SoftHashMap(int initialCapacity)
Constructs an empty soft-referencing map with specified initial capacity and default load factor.

Parameters:
initialCapacity - the initial capacity.
Throws:
java.lang.IllegalArgumentException - if the initial capacity is negative.
See Also:
Maps.AbstractHashMap.DEFAULT_LOAD_FACTOR

Maps.SoftHashMap

public Maps.SoftHashMap(int initialCapacity,
                        float loadFactor)
Constructs an empty soft-referencing map with specified initial capacity and load factor.

Parameters:
initialCapacity - the initial capacity.
loadFactor - the load factor.
Throws:
java.lang.IllegalArgumentException - if the initial capacity is negative or the load factor is nonpositive.

Maps.SoftHashMap

public Maps.SoftHashMap(java.util.Map<? extends K,? extends V> map)
Constructs a soft-referencing map with specified initial mappings, initial capacity based on the number of initial mappings, and default load factor.

Parameters:
map - A map providing initial mappings.
Throws:
java.lang.NullPointerException - if the specified map is null.
See Also:
Maps.AbstractHashMap.DEFAULT_LOAD_FACTOR
Method Detail

createEntry

protected Maps.SoftEntry<K,V> createEntry(int hash,
                                          K key,
                                          V value,
                                          Maps.SoftEntry<K,V> next)
Creates an entry for this map.

The Maps.SoftHashMap implementation creates Maps.SoftEntry entries.

Specified by:
createEntry in class Maps.AbstractHashMap<K,V,Maps.SoftEntry<K,V>>
Parameters:
hash - The hashCode of the key for this entry.
key - The key for this entry.
value - The value for this entry.
next - The entry to follow this entry in the entry chain.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.