Examples of match()


Examples of org.apache.maven.plugins.enforcer.utils.ArtifactMatcher.Pattern.match()

    catch(IllegalArgumentException e){}
   
    try
    {
      Pattern p = new Pattern("*");
      p.match(null);
      fail("NullPointerException expected.");
    }
    catch(NullPointerException e){}
  }
 

Examples of org.apache.myfaces.trinidadinternal.skin.AgentAtRuleMatcher.match()

    {
      AgentAtRuleMatcher agentMatcher = styleSheets[i].getAgentMatcher();
     
      if (agentMatcher != null)
      {
        Set<AgentAtRuleMatcher.Match> matches = agentMatcher.match(agent);
       
        if (matches.contains(AgentAtRuleMatcher.Match.APPLICATION))
        {
          // latch the browser matched
          browserMatched = true;

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

        }

        Perl5Util matchUrlPat = new Perl5Util();
        Perl5Util matchAsciiPat = new Perl5Util();

        if (!matchAsciiPat.match(LEGAL_ASCII_PATTERN, value)) {
            return false;
        }

        // Check the whole url address structure
        if (!matchUrlPat.match(URL_PATTERN, value)) {

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.regex.CompiledAutomaton.match()

   
    @Test
    public void testOrdering() {
        try {
            CompiledAutomaton auto2 = new CompiledAutomaton("[a-z]{3}");
            assertEquals(false, auto2.match("1234", "abc") );
            assertEquals(true, auto2.match("abc", "1234") );
            CompiledRegex regex2 = new CompiledRegex(Pattern.compile("[a-z]{3}"));
            assertEquals(false, regex2.match("1234", "abc") );
            assertEquals(true, regex2.match("abc", "1234") );

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.regex.CompiledRegex.match()

            CompiledAutomaton auto2 = new CompiledAutomaton("[a-z]{3}");
            assertEquals(false, auto2.match("1234", "abc") );
            assertEquals(true, auto2.match("abc", "1234") );
            CompiledRegex regex2 = new CompiledRegex(Pattern.compile("[a-z]{3}"));
            assertEquals(false, regex2.match("1234", "abc") );
            assertEquals(true, regex2.match("abc", "1234") );
           
            NonConstantRegex ncr = new NonConstantRegex();
            assertEquals(false, ncr.match("1234", "abc"));
            assertEquals(false, ncr.match("abc", "1234"));

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.regex.NonConstantRegex.match()

            CompiledRegex regex2 = new CompiledRegex(Pattern.compile("[a-z]{3}"));
            assertEquals(false, regex2.match("1234", "abc") );
            assertEquals(true, regex2.match("abc", "1234") );
           
            NonConstantRegex ncr = new NonConstantRegex();
            assertEquals(false, ncr.match("1234", "abc"));
            assertEquals(false, ncr.match("abc", "1234"));
            assertEquals(true, ncr.match("1234", "\\d\\d\\d\\d"));
            assertEquals(true, ncr.match("abc", "[a-z]{3}"));
           
        } catch( Exception e ){

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PatternPlan.match()

        PhysicalPlan pplan = new PhysicalPlan();
        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);

        // verify that match is false
        boolean matched = ptPlan.match(pplan);
        assertFalse("plan not matched", matched);

       
        //add a filter to the plan (fe -> fil)
        POFilter fil = new POFilter(getNewOpKey());

Examples of org.apache.pig.experimental.plan.optimizer.Rule.match()

         pattern.add(op3);
         pattern.connect(op1, op3);
         pattern.connect(op2, op3);
        
         Rule r = new SillyRule("basic", pattern);
         List<OperatorPlan> l = r.match(plan);
         assertEquals(1, l.size());
         OperatorPlan match = l.get(0);
         assertEquals(match.size(), 3);
         assertEquals(match.getSinks().size(), 1);
         assertEquals(match.getSinks().get(0), join);

Examples of org.apache.pig.newplan.logical.rules.PartitionFilterOptimizer.match()

            "b = filter a by (srcid < 20 and age < 30) or (name == 'foo' and age > 40);" +
            "store b into 'output';";
        LogicalPlan plan = buildPlan(new PigServer(pc), query);
       
        Rule rule = new PartitionFilterOptimizer("test");
        List<OperatorPlan> matches = rule.match(plan);
        if (matches != null) {
            Transformer transformer = rule.getNewTransformer();
            for (OperatorPlan m : matches) {
                if (transformer.check(m)) {
                    transformer.transform(m);

Examples of org.apache.pig.newplan.optimizer.Rule.match()

         pattern.add(op3);
         pattern.connect(op1, op3);
         pattern.connect(op2, op3);
        
         Rule r = new SillyRule("basic", pattern);
         List<OperatorPlan> l = r.match(plan);
         assertEquals(1, l.size());
         OperatorPlan match = l.get(0);
         assertEquals(match.size(), 3);
         assertEquals(match.getSinks().size(), 1);
         assertEquals(match.getSinks().get(0), join);
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.