Examples of match()


Examples of com.bj58.argo.thirdparty.AntPathMatcher.match()

        String pattern = "/{a}/{b}/{c}";

        String sample = "/aa/bb/cc";

        Assert.assertTrue(pathMatcher.match(pattern, sample));

    }


    @Test

Examples of com.bj58.argo.thirdparty.PathMatcher.match()

        String pattern = "/{a}/{b}/{c}";

        String sample = "/aa/bb/cc";

        Assert.assertTrue(pathMatcher.match(pattern, sample));

    }


    @Test

Examples of com.chenlb.mmseg4j.CharNode.KeyTree.match()

  public void testMatch() {
    char[] w = "为什么".toCharArray();
    KeyTree kt = new KeyTree();
    kt.add(w);
    assertTrue(kt.match(w, 0, w.length));
    assertFalse(kt.match(w, 0, 2));
    assertFalse(kt.match("怎么样".toCharArray(), 0, 3));
   
    w = "国人民银行".toCharArray();
    kt.add(w);

Examples of com.cloudera.flume.conf.PatternMatch.match()

  static CommonTree substBEChains(String sink, List<String> collectors)
      throws RecognitionException, FlumeSpecException {

    PatternMatch bePat = recursive(var("be", FlumePatterns.sink(AUTO_BE)));
    CommonTree sinkTree = FlumeBuilder.parseSink(sink);
    Map<String, CommonTree> beMatches = bePat.match(sinkTree);

    ArrayList<String> collSnks = new ArrayList<String>();
    for (String coll : collectors) {
      collSnks.add("{ lazyOpen => logicalSink(\"" + coll + "\") }");
    }

Examples of com.dotcms.repackage.org.apache.oro.text.perl.Perl5Util.match()

        {
            contents = perl.substitute(makeSubstRE(i), contents);
        }

        // Convert closing curlies.
        if (perl.match("m/javascript/i", contents))
        {
            // ASSUMPTION: JavaScript is indented, WM is not.
            contents = perl.substitute("s/\n}/\n#end/g", contents);
        }
        else

Examples of com.firefly.mvc.web.Resource.match()

   
    resource.add("/shop/fruit/apple/?", cm);
    resource.add("/shop/fruit/banana", cm);
    resource.add("/file/info.txt", cm);
   
    Result ret = resource.match("/user/id-3344-2222/55555");
    Assert.assertThat(ret.getParams().length, is(3));
    Assert.assertThat(ret.getParams()[1], is("2222"));
    Assert.assertThat(ret.getParams()[2], is("55555"));
   
    ret = resource.match("/shop/fruit/banana");

Examples of com.firefly.utils.pattern.Pattern.match()

public class TestPattern {
  @Test
  public void testPattern() {
    Pattern p = Pattern.compile("?ddaaad?", "?");
    Assert.assertThat(p.match("ddaaad")[1], is(""));
    Assert.assertThat(p.match("ddaaadxwww")[1], is("xwww"));
    Assert.assertThat(p.match("addaaadxwww")[1], is("xwww"));
    Assert.assertThat(p.match("addaaadxwww")[0], is("a"));
    Assert.assertThat(p.match("addaaad")[0], is("a"));
    Assert.assertThat(p.match("orange"), nullValue());

Examples of com.gentics.cr.lucene.search.highlight.ContentHighlighter.match()

      long s2 = System.currentTimeMillis();
      for (Entry<String, ContentHighlighter> contentHighlighter : highlighters.entrySet()) {
        ContentHighlighter highligther = contentHighlighter.getValue();
        String att = contentHighlighter.getKey();
        //IF crBean matches the highlighters rule => highlight
        if (highligther.match(crBean)) {
          String ret = null;
          if (highligther instanceof AdvancedContentHighlighter) {
            AdvancedContentHighlighter advancedHighlighter = (AdvancedContentHighlighter) highligther;
            int documentId = Integer.parseInt(doc.get("id"));

Examples of com.github.ferstl.maven.pomenforcers.model.functions.DependencyMatcher.match()

  protected final void doEnforce(ErrorReport report) {
    MavenProject mavenProject = EnforcerRuleUtils.getMavenProject(getHelper());
    DependencyMatcher dependencyMatcher = new DependencyMatcher(getHelper());

    BiMap<DependencyModel, DependencyModel> matchedDependencies =
        dependencyMatcher.match(getMavenDependencies(mavenProject), getDeclaredDependencies());

    Set<DependencyModel> resolvedDependencies = matchedDependencies.keySet();
    if (!this.artifactOrdering.isOrdered(resolvedDependencies)) {
      reportError(report, this.artifactOrdering.immutableSortedCopy(resolvedDependencies));
    }

Examples of com.github.restdriver.clientdriver.ClientDriverExpectation.match()

       
        assertThat(expectation.isSatisfied(), is(false));
       
        HttpRealRequest realRequest = mock(HttpRealRequest.class);
       
        expectation.match(realRequest);
        assertThat(expectation.isSatisfied(), is(false));
        expectation.match(realRequest);
        assertThat(expectation.isSatisfied(), is(false));
        expectation.match(realRequest);
        assertThat(expectation.isSatisfied(), is(true));
TOP
Copyright © 2018 www.massapi.com. 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.