public boolean equals(Object obj) { if (obj == null) { return false; } KeyValuePair kvp = (KeyValuePair) obj; String key = kvp.getKey(); if (_key.equals(key)) { return true; } else { return false; } }
public int compareTo(Object obj) { KeyValuePair kvp = (KeyValuePair) obj; return _key.compareTo(kvp.getKey()); }