code: public static List<Entry> sortHashTable(final Hashtable<?, ?> hash, final boolean asc) {
  		// Put keys and values in to an arraylist using entryset
  		final ArrayList<Entry> myArrayList = new ArrayList(hash.entrySet());
  		// Sort the values based on values first and then keys.
  		Collections.sort(myArrayList, new HashComparator(asc));
  		return myArrayList;
  	}
docs: Sort hash table.
  
  @param hash the hash
  @param asc  the asc
  @return the array list