Package org.apache.poi.ss.formula.functions.CountUtils

Examples of org.apache.poi.ss.formula.functions.CountUtils.I_MatchPredicate


    ValueEval v1 = new StringEval("abc");
    ValueEval v2 = ErrorEval.DIV_ZERO;

    AreaEval ev = EvalFactory.createAreaEval("A10:A12", new ValueEval[] { v0, v1, v2, });

    I_MatchPredicate mp;
    mp = Countif.createCriteriaPredicate(ev, 9, srcColIx);
    confirmPredicate(true, mp, srcColIx);
    confirmPredicate(false, mp, "abc");
    confirmPredicate(false, mp, ErrorEval.DIV_ZERO);
View Full Code Here


    confirmPredicate(false, mp, ErrorEval.DIV_ZERO);
    confirmPredicate(true, mp, ErrorEval.VALUE_INVALID);
  }

  public void testCountifEmptyStringCriteria() {
    I_MatchPredicate mp;

    // pred '=' matches blank cell but not empty string
    mp = createCriteriaPredicate(new StringEval("="));
    confirmPredicate(false, mp, "");
    confirmPredicate(true, mp, NULL);
View Full Code Here

    confirmPredicate(false, mp, NULL);
    confirmPredicate(true, mp, "");
  }

  public void testCountifComparisons() {
    I_MatchPredicate mp;

    mp = createCriteriaPredicate(new StringEval(">5"));
    confirmPredicate(false, mp, 4);
    confirmPredicate(false, mp, 5);
    confirmPredicate(true, mp, 6);
View Full Code Here

  /**
   * the criteria arg value can be an error code (the error does not
   * propagate to the COUNTIF result).
   */
  public void testCountifErrorCriteria() {
    I_MatchPredicate mp;

    mp = createCriteriaPredicate(new StringEval("#REF!"));
    confirmPredicate(false, mp, 4);
    confirmPredicate(false, mp, "#REF!");
    confirmPredicate(true, mp, ErrorEval.REF_INVALID);
View Full Code Here

                    expectedValue, actualValue, 0.0001);
        }
  }

  public void testWildCards() {
    I_MatchPredicate mp;

    mp = createCriteriaPredicate(new StringEval("a*b"));
    confirmPredicate(false, mp, "abc");
    confirmPredicate(true, mp, "ab");
    confirmPredicate(true, mp, "axxb");
View Full Code Here

    confirmPredicate(false, mp, 12812);
    confirmPredicate(true, mp, "12812");
    confirmPredicate(false, mp, "128812");
  }
  public void testNotQuiteWildCards() {
    I_MatchPredicate mp;

    // make sure special reg-ex chars are treated like normal chars
    mp = createCriteriaPredicate(new StringEval("a.b"));
    confirmPredicate(false, mp, "aab");
    confirmPredicate(true, mp, "a.b");
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.formula.functions.CountUtils.I_MatchPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.