package com.wizzardo.tools.collections;

/**
 * @author: moxa
 * Date: 12/11/12
 */
public class Pair<K, V> {
    public K key;
    public V value;

    public Pair(K key, V value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Pair pair = (Pair) o;

        if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
        if (value != null ? !value.equals(pair.value) : pair.value != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = key != null ? key.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }
}

@@ -819,11 +819,98 @@
 t;%0A    %7D
+%0A%0A    @Override%0A    public String toString() %7B%0A        return key + %22: %22 + value;%0A    %7D
 %0A%7D%0A

add toString