public static String buildSubscript ( Iterable < Object > subscripts ) { StringBuilder sb = new StringBuilder ( ) ; for ( Object subscript : subscripts ) { String value = toString ( subscript ) ; if ( value . isEmpty ( ) ) { throw new RuntimeException ( "Null subscript not allowed." ) ; } if ( sb . length ( ) > 0 ) { sb . append ( "," ) ; } if ( StringUtils . isNumeric ( value ) ) { sb . append ( value ) ; } else { sb . append ( QT ) ; sb . append ( value . replaceAll ( QT , QT2 ) ) ; sb . append ( QT ) ; } } return sb . toString ( ) ; }
Converts a list of objects to a string of M subscripts .