Examples of matches()


Examples of org.apache.oro.text.regex.PatternMatcher.matches()

      //loop the matches
      while (matcher.contains(input, pattern)) {
        result = matcher.getMatch();
        url = result.group(2);
        PatternMatcherInput input1 = new PatternMatcherInput(url);
        if (!matcher1.matches(input1, pattern1)) {
          //if (LOG.isTraceEnabled()) { LOG.trace(" - invalid '" + url + "'"); }
          continue;
        }
        if (url.startsWith("www.")) {
            url = "http://" + url;

Examples of org.apache.oro.text.regex.Perl5Matcher.matches()

      }
       
      for (int r=0; r<nRecipients-1; r++) {
      bAllowed = true;
      try {
        if (sAllowPattern.length()>0) bAllowed &= oMatcher.matches(aRecipients[r], oAllowPattern);
      } catch (ArrayIndexOutOfBoundsException aiob) {
        throw new ArrayIndexOutOfBoundsException("Gadgets.matches("+aRecipients[r]+","+sAllowPattern+")");
      }
      try {
      if (sDenyPattern.length()>0) bAllowed &= !oMatcher.matches(aRecipients[r], oDenyPattern);

Examples of org.apache.poi.hssf.record.formula.functions.CountUtils.I_MatchPredicate.matches()

  public void testCriteriaPredicateNe_Bug46647() {
    I_MatchPredicate mp = Countif.createCriteriaPredicate(new StringEval("<>aa"), 0, 0);
    StringEval seA = new StringEval("aa"); // this should not match the criteria '<>aa'
    StringEval seB = new StringEval("bb"); // this should match
    if (mp.matches(seA) && !mp.matches(seB)) {
      throw new AssertionFailedError("Identified bug 46647");
    }
    assertFalse(mp.matches(seA));
    assertTrue(mp.matches(seB));

Examples of org.apache.poi.ss.formula.functions.CountUtils.I_MatchPredicate.matches()

  public void testCriteriaPredicateNe_Bug46647() {
    I_MatchPredicate mp = Countif.createCriteriaPredicate(new StringEval("<>aa"), 0, 0);
    StringEval seA = new StringEval("aa"); // this should not match the criteria '<>aa'
    StringEval seB = new StringEval("bb"); // this should match
    if (mp.matches(seA) && !mp.matches(seB)) {
      throw new AssertionFailedError("Identified bug 46647");
    }
    assertFalse(mp.matches(seA));
    assertTrue(mp.matches(seB));

Examples of org.apache.qpid.client.filter.JMSSelectorFilter.matches()

        assertTrue("Filter object is invalid", simpleSelectorFilter != null);

        final JMSTextMessage message = TestMessageHelper.newJMSTextMessage();

        message.setIntProperty("select", 4);
        assertFalse("Selector did match when not expected", simpleSelectorFilter.matches(message));
        message.setIntProperty("select", 5);
        assertTrue("Selector didnt match when expected", simpleSelectorFilter.matches(message));
        message.setIntProperty("select", 6);
        assertFalse("Selector did match when not expected", simpleSelectorFilter.matches(message));
    }

Examples of org.apache.qpid.client.filter.MessageFilter.matches()

        assertTrue("Filter object is invalid", simpleSelectorFilter != null);

        final JMSTextMessage message = TestMessageHelper.newJMSTextMessage();

        message.setIntProperty("select", 4);
        assertFalse("Selector did match when not expected", simpleSelectorFilter.matches(message));
        message.setIntProperty("select", 5);
        assertTrue("Selector didnt match when expected", simpleSelectorFilter.matches(message));
        message.setIntProperty("select", 6);
        assertFalse("Selector did match when not expected", simpleSelectorFilter.matches(message));
    }

Examples of org.apache.qpid.server.filter.MessageFilter.matches()

                for(Map.Entry<BaseQueue, MessageFilter> entry : filteredQueues.entrySet())
                {
                    if(!queuesSet.contains(entry.getKey()))
                    {
                        MessageFilter filter = entry.getValue();
                        if(filter.matches(payload))
                        {
                            queuesSet.add(entry.getKey());
                        }
                    }
                }

Examples of org.apache.qpid.server.security.access.firewall.FirewallRule.matches()

        {
            return true;
        }
        else
        {
            return firewallRule.matches(addressOfClient);
        }
    }

    public Operation getOperation()
    {

Examples of org.apache.servicemix.jbi.container.SubscriptionSpec.matches()

        List<InternalEndpoint> result = null;
        for (Iterator iter = subscriptions.entrySet().iterator(); iter.hasNext();) {
            Map.Entry entry = (Map.Entry) iter.next();

            SubscriptionSpec subscription = (SubscriptionSpec) entry.getKey();
            if (subscription.matches(registry, exchange)) {
                if (result == null) {
                    result = new ArrayList<InternalEndpoint>();
                }
                InternalEndpoint endpoint = (InternalEndpoint) entry.getValue();
                result.add(endpoint);

Examples of org.apache.shiro.util.PatternMatcher.matches()

        expect(request.getAttribute(WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE)).andReturn("/context");
        expect(request.getAttribute(WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE)).andReturn("/mychain");

        expect(request.getCharacterEncoding()).andStubReturn(null);

        expect(patternMatcher.matches(chainOne, "/mychain")).andReturn(false);
        expect(patternMatcher.matches(chainTwo, "/mychain")).andReturn(true);

        Filter filter2a = ctrl.createMock(Filter.class);
        Filter filter2b = ctrl.createMock(Filter.class);
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.