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;}
public static int CountMatchingCellsInArea(ThreeDEval areaEval, IMatchPredicate criteriaPredicate){int result = 0;for (int sIx = areaEval.FirstSheetIndex; sIx <= areaEval.LastSheetIndex; sIx++){int height = areaEval.Height;int width = areaEval.Width;for (int rrIx = 0; rrIx < height; rrIx++){for (int rcIx = 0; rcIx < width; rcIx++){ValueEval ve = areaEval.GetValue(sIx, rrIx, rcIx);if (criteriaPredicate is I_MatchAreaPredicate){I_MatchAreaPredicate areaPredicate = (I_MatchAreaPredicate)criteriaPredicate;if (!areaPredicate.Matches(areaEval, rrIx, rcIx)) continue;}if (criteriaPredicate.Matches(ve)){result++;}}}}return result;}