public static int countArg(ValueEval eval, I_MatchPredicate criteriaPredicate) {if (eval == null) {throw new IllegalArgumentException("eval must not be null");}if (eval instanceof ThreeDEval) {return countMatchingCellsInArea((ThreeDEval) eval, criteriaPredicate);}if (eval instanceof TwoDEval) {throw new IllegalArgumentException("Count requires 3D Evals, 2D ones aren't supported");}if (eval instanceof RefEval) {return CountUtils.countMatchingCellsInRef((RefEval) eval, criteriaPredicate);}return criteriaPredicate.matches(eval) ? 1 : 0;}
public static int CountArg(ValueEval eval, IMatchPredicate criteriaPredicate){if (eval == null){throw new ArgumentException("eval must not be null");}if (eval is ThreeDEval){return CountUtils.CountMatchingCellsInArea((ThreeDEval)eval, criteriaPredicate);}if (eval is TwoDEval){throw new ArgumentException("Count requires 3D Evals, 2D ones aren't supported");}if (eval is RefEval){return CountUtils.CountMatchingCellsInRef((RefEval)eval, criteriaPredicate);}return criteriaPredicate.Matches(eval) ? 1 : 0;}