public static String sortKey(String key){
  if (key != null) {
    String[] ids=key.split(DIMENSION_SEP);
    Collections.sort(Arrays.asList(ids));
    key=StringUtils.join(ids,DIMENSION_SEP);
  }
  return key;
}

public static String sortKey ( String key ) { if ( key != null ) { String [ ] ids = key . split ( DIMENSION_SEP ) ; Collections . sort ( Arrays . asList ( ids ) ) ; key = StringUtils . join ( ids , DIMENSION_SEP ) ; } return key ; }
sorts the given key by splitting on the ' - ' character and sorting the components alphabetically .
