@ Deprecated public List < String > getFirstCharactersInScripts ( ) { List < String > dest = new ArrayList < String > ( 200 ) ; // Fetch the script-first-primary contractions which are defined in the root collator. // They all start with U+FDD1. UnicodeSet set = new UnicodeSet ( ) ; collatorPrimaryOnly . internalAddContractions ( 0xFDD1 , set ) ; if ( set . isEmpty ( ) ) { throw new UnsupportedOperationException ( "AlphabeticIndex requires script-first-primary contractions" ) ; } for ( String boundary : set ) { int gcMask = 1 << UCharacter . getType ( boundary . codePointAt ( 1 ) ) ; if ( ( gcMask & ( GC_L_MASK | GC_CN_MASK ) ) == 0 ) { // Ignore boundaries for the special reordering groups. // Take only those for "real scripts" (where the sample character is a Letter, // and the one for unassigned implicit weights (Cn). continue ; } dest . add ( boundary ) ; } return dest ; }
Return a list of the first character in each script . Only exposed for testing .