private static int countTrue ( final boolean ... b ) { if ( b == null ) { return 0 ; } int count = 0 ; for ( boolean bb : b ) { if ( bb ) { ++ count ; } } return count ; }
Count how many parameters are true .