Examples of match()


Examples of org.lilyproject.indexer.model.indexerconf.WildcardPattern.match()

public class WildcardPatternTest {
    @Test
    public void testStartsWith() throws Exception {
        WildcardPattern pattern = new WildcardPattern("foo*");
        Pair<Boolean, String> result = pattern.match("foobar");
        assertTrue(result.getV1());
        assertEquals("bar", result.getV2());

        result = pattern.match("fobar");
        assertFalse(result.getV1());

Examples of org.modelmapper.internal.MatchingStrategyTestSupport.match()

   * G g -> aa/dd/g
   * </pre>
   */
  public void assertMatches() {
    MatchingStrategyTestSupport tester = new MatchingStrategyTestSupport(MatchingStrategies.LOOSE);
    tester.match(A.class, "a").$(C.class, "c").to("aa", "bb", "c").assertMatch();
    tester.match(D.class, "d").$(E.class, "e").to("aa", "dd", "e").assertMatch();
    tester.match(D.class, "d").$(E.class, "e").$(F.class, "f").to("aa", "dd", "f").assertMatch();
    tester.match(G.class, "g").to("aa", "dd", "g").assertMatch();
  }

Examples of org.mom4j.messaging.select.Element.match()

        Message ret = null;
        String dest = destination + "-" + consumerId;

        if(e != null) {
            while((ret =  this.console.receiveInternal(sessionId, dest)) != null) {
                if(e.match(ret)) {
                    break;
                }
            }
        } else {
            ret = this.console.receiveInternal(sessionId, dest);

Examples of org.netbeans.server.componentsmatch.Matcher.match()

            Utils.processPersistable(new Persistable.Query() {

                public TransactionResult runQuery(EntityManager em) {
                    StackTraceElement element = new StackTraceElement(className, methodName, null, 0);
                    Matcher matcher = Matcher.getDefault();
                    Component comp = matcher.match(em, new StackTraceElement[]{element});
                    register(request, comp);
                    return TransactionResult.NONE;
                }
            });
        }

Examples of org.nutz.dao.FieldMatcher.match()

      List<MappingField> efs = _en(en).getMappingFields();

      int old = sb.length();

      for (MappingField ef : efs) {
        if (fm.match(ef.getName()))
          sb.append(ef.getColumnName()).append(',');
      }

      if (sb.length() == old)
        throw Lang.makeThrow("No columns be queryed: '%s'", _en(en));

Examples of org.omg.CosNotifyFilter.Filter.match()

        long _start = System.currentTimeMillis();

        for (int x = 0; x < runs; ++x)
        {
            boolean _r = _filter.match(event);
            assertTrue(_r);
        }

        long _total = System.currentTimeMillis() - _start;

Examples of org.omg.CosNotifyFilter.FilterOperations.match()

        controlFilterOperations_.replay();

        FilterOperations handle = objectUnderTest_.getFilterOperations();

        assertTrue(handle.match(any_));

        controlFilterOperations_.verify();
    }

    public void testGetLastUsage() throws Exception

Examples of org.omg.CosNotifyFilter.MappingFilterOperations.match()

                getConfiguration(), filter_, defaultValue);

        AnyHolder anyHolder = new AnyHolder();

        // filter is empty. should not match
        assertTrue(!_mappingFilter.match(testPerson_, anyHolder));

        // add some filter data
        Any resultToSet = getORB().create_any();

        resultToSet.insert_string("this indicates success");

Examples of org.openbel.framework.core.compiler.expansion.ModificationExpansionRule.match()

        Term term;
        List<Statement> stmts;

        // valid substitution
        term = BELParser.parseTerm("p(HGNC:TNF,sub(V,599,E))");
        assertThat(rule.match(term), is(true));
        stmts = rule.expand(term);
        assertThat(stmts.size(), is(1));
        assertThat(stmts.get(0).toBELShortForm(),
                is("p(HGNC:TNF) hasVariant p(HGNC:TNF,sub(V,599,E))"));

Examples of org.openjena.atlas.web.AcceptList.match()

    /** Match a single media type against a header string */
    public static String match(String headerString, String mediaRangeStr)
    {
        AcceptList l = new AcceptList(headerString) ;
        MediaRange aItem = new MediaRange(mediaRangeStr) // MediaType
        MediaType m = l.match(aItem) ;
        if ( m == null )
            return null ;
        return m.toHeaderString() ;
    }
   
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.