text: public static int countMatchingCellsInArea(ThreeDEval areaEval, I_MatchPredicate criteriaPredicate) {int result = 0;final int firstSheetIndex = areaEval.getFirstSheetIndex();final int lastSheetIndex = areaEval.getLastSheetIndex();for (int sIx = firstSheetIndex; sIx <= lastSheetIndex; sIx++) {int height = areaEval.getHeight();int width = areaEval.getWidth();for (int rrIx=0; rrIx<height; rrIx++) {for (int rcIx=0; rcIx<width; rcIx++) {ValueEval ve = areaEval.getValue(sIx, rrIx, rcIx);if(criteriaPredicate instanceof I_MatchAreaPredicate){I_MatchAreaPredicate areaPredicate = (I_MatchAreaPredicate)criteriaPredicate;if(!areaPredicate.matches(areaEval, rrIx, rcIx)) continue;}if(criteriaPredicate.matches(ve)) {result++;}}}}return result;}