org.helidb.api.support
Class MapEntry<K,V>

java.lang.Object
  extended by org.helidb.api.support.MapEntry<K,V>
Type Parameters:
K - The type of keys in the map.
V - The type of values in the map.
All Implemented Interfaces:
Map.Entry<K,V>

public class MapEntry<K,V>
extends Object
implements Map.Entry<K,V>

This is an implementation of Map.Entry that can be used by classes implementing the Map interface.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
helidb-core

Constructor Summary
MapEntry(Map<K,V> m, K key, V value)
          Create a new map entry.
 
Method Summary
 boolean equals(Object o)
          Implemented according to the contract in Map.Entry.
 K getKey()
           
 V getValue()
           
 int hashCode()
          Implemented according to the contract in Map.Entry.
 V setValue(V value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapEntry

public MapEntry(Map<K,V> m,
                K key,
                V value)
Create a new map entry.

Parameters:
m - The map owning this entry.
key - The entry's key.
value - The entry's value.
Method Detail

getKey

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

getValue

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

setValue

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

equals

public boolean equals(Object o)
Implemented according to the contract in Map.Entry.

Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Implemented according to the contract in Map.Entry.

Specified by:
hashCode in interface Map.Entry<K,V>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object