question: public static String comparableQualifier ( String qualifier ) { int i = _QUALIFIERS . indexOf ( qualifier ) ; return i == - 1 ? _QUALIFIERS . size ( ) + "-" + qualifier : String . valueOf ( i ) ; }
target:  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.