
public class Entry<K,V>
{
    private K key;     // Key
    private V value;   // Value

    public Entry(K k, V v)  // Constructor
    {
        key = k;
        value = v;
    }

    /** Accessor method for the key */
    public K getKey() {return key;}

    /** Accessor method for the value */
    public V getValue() {return value;}

    /** Mutator method for the value */
    public void setValue(V v) {value = v;}

    public String toString()
    {
        return "(" + key + "," + value + ")";
    }
}

