public static String comparableQualifier(String qualifier){
  int i=_QUALIFIERS.indexOf(qualifier);
  return i == -1 ? _QUALIFIERS.size() + "-" + qualifier : String.valueOf(i);
}

public static String comparableQualifier ( String qualifier ) { int i = _QUALIFIERS . indexOf ( qualifier ) ; return i == - 1 ? _QUALIFIERS . size ( ) + "-" + qualifier : String . valueOf ( i ) ; }
returns a comparable value for a qualifier . < p / > this method both takes into account the ordering of known qualifiers as well as lexical ordering for unknown qualifiers . < p / > just returning an integer with the index here is faster , but requires a lot of if / then / else to check for - 1 or qualifiers . size and then resort to lexical ordering . most comparisons are decided by the first character , so this is still fast . if more characters are needed then it requires a lexical sort anyway .
