org.sourceforge.jemm.util.managed
Class ECMEntry<K,V>

java.lang.Object
  extended by org.sourceforge.jemm.util.managed.ECMEntry<K,V>
Type Parameters:
K - The key type.
V - The value type.

public class ECMEntry<K,V>
extends java.lang.Object

An entry within an EnhancedConcurrentHashMap

Author:
Rory Graves

Constructor Summary
ECMEntry(K key, V value)
          Creates an ECMEntry with the given key and value
 
Method Summary
 K getKey()
          Returns the key of this entry.
 V getValue()
          Returns the value of this entry.
 boolean isAlive()
          Returned whether this entry has been marked as dead, or has a null value.
 void markAsDead()
          Mark this entry as dead.
 void setValue(V newValue)
          Set the value to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECMEntry

public ECMEntry(K key,
                V value)
Creates an ECMEntry with the given key and value

Parameters:
key - The key.
value - The value.
Method Detail

getKey

public K getKey()
Returns the key of this entry.

Returns:
The key value.

getValue

public V getValue()
Returns the value of this entry.

Returns:
The current value.

setValue

public void setValue(V newValue)
Set the value to the given value.

Parameters:
newValue - The new value to store.

markAsDead

public final void markAsDead()
Mark this entry as dead.


isAlive

public boolean isAlive()
Returned whether this entry has been marked as dead, or has a null value.

Returns:
true if this value should be kept.


Copyright © 2009. All Rights Reserved.