KeyValuePair keyValuePair = (KeyValuePair) o; return fKey.compareTo(keyValuePair.fKey);
int counter = 0; String key = ((KeyValuePair) o).fKey; int minLen = Math.min(key.length(), fKey.length()); int diffLen = Math.abs(key.length() - fKey.length()); for (int i=0; i<minLen; i++) { if (key.charAt(i) == fKey.charAt(i)) { counter++; } } return counter - diffLen;
        public int compareTo(Object o) {            KeyValuePair keyValuePair = (KeyValuePair) o;            return fKey.compareTo(keyValuePair.fKey);        }