com.acsinet_solutions.util.adt
Class MapEntryImpl<K,V>

java.lang.Object
  extended by com.acsinet_solutions.util.adt.MapEntryImpl<K,V>
All Implemented Interfaces:
java.util.Map.Entry<K,V>

public final class MapEntryImpl<K,V>
extends java.lang.Object
implements java.util.Map.Entry<K,V>

A simple implementation of Map.Entry

Author:
Santiago Arriaga

Constructor Summary
MapEntryImpl(K key, V value)
           
MapEntryImpl(K key, V value, boolean mutable)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 K getKey()
           
 V getValue()
           
 int hashCode()
           
 V setValue(V value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapEntryImpl

public MapEntryImpl(K key,
                    V value,
                    boolean mutable)
Parameters:
key - The not-null key of the entry
value - The maybe-null value of the entry
mutable - whether or not this entry is mutable

MapEntryImpl

public MapEntryImpl(K key,
                    V value)
Parameters:
key - The not-null key of the entry
value - The maybe-null value of the entry
Method Detail

getKey

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

getValue

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

setValue

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

equals

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

hashCode

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