Beispiel #1
0
  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;
    }
  }
Beispiel #2
0
  public int compareTo(Object obj) {
    KeyValuePair kvp = (KeyValuePair) obj;

    return _key.compareTo(kvp.getKey());
  }