public boolean isUnique(String word) {
        if (word.length() == 0 || word.length() == 1) {
            return true;
        }
        String key = "";
        int len = 0;
        if (word.length() > 0) {
            key = word.charAt(0) + "" + word.charAt(word.length() - 1);
            len = word.length() - 2;
        }
        Map<Integer, Integer> set = map.get(key);
        if (set == null) {
            return true;
        }
        Integer count = set.get(len);
        return count == null || count == 1;
    }
Date 04/15/2016
@author Tushar Roy

Given a dictionary of words and a word tell if there is unique abbrreviation of this word in the dictionary.
src/com/interview/string/ValidWordAbbreviation.java