question: public static void reduceMethodList ( ArrayList < Integer > values , ArrayList < String > labels , String allowedMethods ) { String [ ] allowedStrings = allowedMethods . split ( "," ) ; int [ ] allowedValues = new int [ allowedStrings . length ] ; for ( int i = 0 ; i < allowedValues . length ; i ++ ) { try { allowedValues [ i ] = Integer . parseInt ( allowedStrings [ i ] , 10 ) ; } catch ( NumberFormatException nfe ) { Log . w ( TAG , "Bad allowed-strings list: '" + allowedStrings [ i ] + "' in '" + allowedMethods + "'" ) ; return ; } } for ( int i = values . size ( ) - 1 ; i >= 0 ; i -- ) { int val = values . get ( i ) ; int j ; for ( j = allowedValues . length - 1 ; j >= 0 ; j -- ) { if ( val == allowedValues [ j ] ) { break ; } } if ( j < 0 ) { values . remove ( i ) ; labels . remove ( i ) ; } } }
target:  Remove entries from the method list that aren't allowed for this calendar.