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

E17493-02

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

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.SoftReference<V>
          extended by oracle.javatools.util.Maps.SoftLinkedEntry<K,V>
Type Parameters:
K - The type of key stored by the entry.
V - The type of value stored by the entry.
All Implemented Interfaces:
java.util.Map.Entry<K,V>, Maps.BaseEntry<K,V>, Maps.LinkedEntry<K,V>
Direct Known Subclasses:
Maps.TimedSoftLinkedEntry
Enclosing class:
Maps

public static class Maps.SoftLinkedEntry<K,V>
extends java.lang.ref.SoftReference<V>
implements Maps.LinkedEntry<K,V>

An Maps.LinkedEntry implementation which holds its value with a SoftReference.

Because the referent of a soft reference cannot be changed, the setValue(V) method throws UnsupportedOperationException if invoked.

See Also:
Maps.SoftLinkedHashMap

Constructor Summary
protected Maps.SoftLinkedEntry(int hash, K key, V value, Maps.LinkedEntry<K,V> next, java.lang.ref.ReferenceQueue<V> queue)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 Maps.LinkedEntry<K,V> getAfter()
          Gets the next entry in the iteration list of the containing map.
 Maps.LinkedEntry<K,V> getBefore()
          Gets the previous entry in the iteration list of the containing map.
 K getKey()
           
 Maps.BaseEntry<K,V> getNext()
          Gets the next entry in the containing hash chain of the containing map.
 V getValue()
           
 int hashCode()
           
 boolean isMutable()
          Gets whether this entry is mutable, in particular whether Map.Entry.setValue(V) is supported.
 int keyHashCode()
          Gets the hash code of the key in this entry.
 void setAfter(Maps.LinkedEntry<K,V> after)
          Sets the next entry in the iteration list of the containing map.
 void setBefore(Maps.LinkedEntry<K,V> before)
          Sets the previous entry in the iteration list of the containing map.
 void setNext(Maps.BaseEntry<K,V> next)
          Sets the next entry in the containing hash chain of the containing map.
 V setValue(V newValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.ref.SoftReference
get
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Maps.SoftLinkedEntry

protected Maps.SoftLinkedEntry(int hash,
                               K key,
                               V value,
                               Maps.LinkedEntry<K,V> next,
                               java.lang.ref.ReferenceQueue<V> queue)
Method Detail

getKey

public K getKey()
Specified by:
getKey in interface java.util.Map.Entry<K,V>

getValue

public V getValue()
Specified by:
getValue in interface java.util.Map.Entry<K,V>

setValue

public V setValue(V newValue)
Specified by:
setValue in interface java.util.Map.Entry<K,V>

getNext

public Maps.BaseEntry<K,V> getNext()
Description copied from interface: Maps.BaseEntry
Gets the next entry in the containing hash chain of the containing map.

Specified by:
getNext in interface Maps.BaseEntry<K,V>

setNext

public void setNext(Maps.BaseEntry<K,V> next)
Description copied from interface: Maps.BaseEntry
Sets the next entry in the containing hash chain of the containing map.

Specified by:
setNext in interface Maps.BaseEntry<K,V>

keyHashCode

public int keyHashCode()
Description copied from interface: Maps.BaseEntry
Gets the hash code of the key in this entry.

Specified by:
keyHashCode in interface Maps.BaseEntry<K,V>

isMutable

public boolean isMutable()
Description copied from interface: Maps.BaseEntry
Gets whether this entry is mutable, in particular whether Map.Entry.setValue(V) is supported.

Specified by:
isMutable in interface Maps.BaseEntry<K,V>

getBefore

public final Maps.LinkedEntry<K,V> getBefore()
Description copied from interface: Maps.LinkedEntry
Gets the previous entry in the iteration list of the containing map.

Specified by:
getBefore in interface Maps.LinkedEntry<K,V>

getAfter

public final Maps.LinkedEntry<K,V> getAfter()
Description copied from interface: Maps.LinkedEntry
Gets the next entry in the iteration list of the containing map.

Specified by:
getAfter in interface Maps.LinkedEntry<K,V>

setBefore

public final void setBefore(Maps.LinkedEntry<K,V> before)
Description copied from interface: Maps.LinkedEntry
Sets the previous entry in the iteration list of the containing map.

Specified by:
setBefore in interface Maps.LinkedEntry<K,V>

setAfter

public final void setAfter(Maps.LinkedEntry<K,V> after)
Description copied from interface: Maps.LinkedEntry
Sets the next entry in the iteration list of the containing map.

Specified by:
setAfter in interface Maps.LinkedEntry<K,V>

equals

public boolean equals(java.lang.Object object)
Specified by:
equals in interface java.util.Map.Entry<K,V>
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map.Entry<K,V>
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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

E17493-02

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