Package games.stendhal.common.parser

Examples of games.stendhal.common.parser.ExactExprMatcher


    boolean mergeExpressions = false;

    if (sel.equals("joker matching")) {
      selectedMatcher = new JokerExprMatcher();
    } else if (sel.equals("exact matching")) {
      selectedMatcher = new ExactExprMatcher();
    } else if (sel.equals("case insensitive")) {
      selectedMatcher = new CaseInsensitiveExprMatcher();
    } else if (sel.equals("similarity matching")) {
      selectedMatcher = new SimilarExprMatcher();
    } else if (sel.equals("controlled matching")) {
View Full Code Here


  /**
   * Tests for exactMatching.
   */
  @Test
  public final void testExactMatching() {
    final ExpressionMatcher matcher = new ExactExprMatcher();

    final Expression abcVER = new Expression("abc", "VER");
    final Expression abcVERCopy = new Expression("abc", "VER");
    final Expression ab = new Expression("ab", "VER");
    final Expression abcSUB = new Expression("abc", "SUB");
    final Expression X = new Expression("X", "SUB");
    final Expression aBc = new Expression("aBc", "SUB");

    assertTrue(matcher.match(abcVER, abcVERCopy));
    assertFalse(matcher.match(abcVER, ab));
    assertTrue(matcher.match(abcVER, abcSUB));
    assertFalse(matcher.match(abcVER, X));
    assertFalse(matcher.match(abcSUB, X));
    assertFalse(matcher.match(abcVER, aBc));
  }
View Full Code Here

TOP

Related Classes of games.stendhal.common.parser.ExactExprMatcher

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.