public static String getAt ( CharSequence self , Collection indices ) { StringBuilder answer = new StringBuilder ( ) ; for ( Object value : indices ) { if ( value instanceof Range ) { answer . append ( getAt ( self , ( Range ) value ) ) ; } else if ( value instanceof Collection ) { answer . append ( getAt ( self , ( Collection ) value ) ) ; } else { int idx = DefaultTypeTransformation . intUnbox ( value ) ; answer . append ( getAt ( self , idx ) ) ; } } return answer . toString ( ) ; }
Select a List of characters from a CharSequence using a Collection to identify the indices to be selected .