de.unihalle.informatik.Alida.helpers
Class ALDWeakHashMapEntry

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference
          extended by de.unihalle.informatik.Alida.helpers.ALDWeakHashMapEntry

 class ALDWeakHashMapEntry
extends java.lang.ref.WeakReference

Weak reference hashmap entry.

Author:
moeller

Field Summary
protected  int hash
          Hash value of referenced object.
protected  ALDWeakHashMapEntry next
          Pointer to the next reference in hashmap list.
protected  java.lang.Object value
          Referenced object itself.
 
Constructor Summary
protected ALDWeakHashMapEntry(int _hash, java.lang.Object _key, java.lang.Object _value, ALDWeakHashMapEntry _next, java.lang.ref.ReferenceQueue<java.lang.Object> queue)
          Constructor.
 
Method Summary
 java.lang.Object getKey()
          Returns the key of this hashmap element.
 ALDWeakHashMapEntry getNext()
          Returns reference to subsequent hash element.
 java.lang.Object getValue()
          Returns the value of this hashmap element.
 java.lang.Object setValue(java.lang.Object _value)
          Sets the value of the hashmap entry.
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hash

protected final int hash
Hash value of referenced object.


next

protected volatile ALDWeakHashMapEntry next
Pointer to the next reference in hashmap list.


value

protected volatile java.lang.Object value
Referenced object itself.

Constructor Detail

ALDWeakHashMapEntry

protected ALDWeakHashMapEntry(int _hash,
                              java.lang.Object _key,
                              java.lang.Object _value,
                              ALDWeakHashMapEntry _next,
                              java.lang.ref.ReferenceQueue<java.lang.Object> queue)
Constructor.

Parameters:
_hash - Hash value.
_key - Key object.
_value - Hashmap value of the object.
_next - Reference to subsequent object.
queue - Queue for managing references of deleted objects.
Method Detail

getKey

public java.lang.Object getKey()
Returns the key of this hashmap element.


getNext

public ALDWeakHashMapEntry getNext()
Returns reference to subsequent hash element.


getValue

public java.lang.Object getValue()
Returns the value of this hashmap element.


setValue

public java.lang.Object setValue(java.lang.Object _value)
Sets the value of the hashmap entry.

Parameters:
_value - New value of this object reference.
Returns:
Reference to the new value.