Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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

java.lang.Object
  extended by oracle.javatools.util.Maps.AbstractHashMap<K,V,E>
      extended by oracle.javatools.util.Maps.AbstractLinkedHashMap<K,V,Maps.SoftLinkedEntry<K,V>>
          extended by oracle.javatools.util.Maps.SoftLinkedHashMap<K,V>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
Direct Known Subclasses:
ResourceBundleManager.BundleCache
Enclosing class:
Maps

public static class Maps.SoftLinkedHashMap<K,V>
extends Maps.AbstractLinkedHashMap<K,V,Maps.SoftLinkedEntry<K,V>>

An implementation of Maps.AbstractLinkedHashMap, based on Maps.SoftLinkedEntry, which holds its values with SoftReferences.

See Also:
LinkedHashMap, 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.SoftLinkedHashMap()
          Constructs an empty soft-referencing, insertion-ordered map with default capacity and load factor.
Maps.SoftLinkedHashMap(int initialCapacity)
          Constructs an empty soft-referencing, insertion-ordered map with specified initial capacity and default load factor.
Maps.SoftLinkedHashMap(int initialCapacity, float loadFactor)
          Constructs an empty soft-referencing, insertion-ordered map with specified initial capacity and load factor.
Maps.SoftLinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder)
          Constructs an empty soft-referencing map with specified initial capacity, load factor, and iteration order.
Maps.SoftLinkedHashMap(java.util.Map<? extends K,? extends V> map)
          Constructs a soft-referencing, insertion-ordered map with specified initial mappings, initial capacity based on the number of initial mappings, and default load factor.
 
Method Summary
protected  Maps.SoftLinkedEntry<K,V> createEntry(int hash, K key, V value, Maps.SoftLinkedEntry<K,V> next)
          Creates an entry for this map.
 
Methods inherited from class oracle.javatools.util.Maps.AbstractLinkedHashMap
clear, createEntryIterator, createEntrySetIterator, createKeySetIterator, createValuesIterator, entryEvicted, evictExistingEntry, getEldestEntry, mapChanged, removeEldestEntry
 
Methods inherited from class oracle.javatools.util.Maps.AbstractHashMap
addEntry, capacity, change, clone, containsKey, containsValue, entryAccessed, entryAdded, entryChanged, entryPurged, entryRemoved, entrySet, equals, get, getChangeCount, getEntry, getQueue, hashCode, isEmpty, keyEquals, keyHashCode, keySet, loadFactor, 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.SoftLinkedHashMap

public Maps.SoftLinkedHashMap()
Constructs an empty soft-referencing, insertion-ordered map with default capacity and load factor.

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

Maps.SoftLinkedHashMap

public Maps.SoftLinkedHashMap(int initialCapacity)
Constructs an empty soft-referencing, insertion-ordered 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.SoftLinkedHashMap

public Maps.SoftLinkedHashMap(int initialCapacity,
                              float loadFactor)
Constructs an empty soft-referencing, insertion-ordered 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.SoftLinkedHashMap

public Maps.SoftLinkedHashMap(java.util.Map<? extends K,? extends V> map)
Constructs a soft-referencing, insertion-ordered 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

Maps.SoftLinkedHashMap

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

Parameters:
initialCapacity - the initial capacity.
loadFactor - the load factor.
accessOrder - true if iteration is access-ordered, false if iteration-ordered.
Throws:
java.lang.IllegalArgumentException - if the initial capacity is negative or the load factor is nonpositive.
Method Detail

createEntry

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

The Maps.SoftLinkedHashMap implementation creates Maps.SoftLinkedEntry entries.

Specified by:
createEntry in class Maps.AbstractHashMap<K,V,Maps.SoftLinkedEntry<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 Reference
11g Release 1 (11.1.1)

E13403-03

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