@Override public String toString() { return getKey(); } }
public String toBase64() { return getKey(); }
@Override public int compare(Contact contact1, Contact contact2) { int nameComparison = String.CASE_INSENSITIVE_ORDER.compare(contact1.getName(), contact2.getName()); if (nameComparison == 0) { // if the names are the same, compare destination keys String key1 = contact1.getDestination().getKey(); String key2 = contact2.getDestination().getKey(); return key1.compareTo(key2); } else return nameComparison; } }