Examples of match()


Examples of aQute.lib.filter.Filter.match()

      else if (modeRequire.getFilter() == null)
        iter.remove();
      else {
        try {
          Filter filter = new Filter(modeRequire.getFilter());
          if (!filter.match(modeCapability))
            iter.remove();
        } catch (IllegalArgumentException e) {
          synchronized (this) {
            if (reporter != null)
              reporter.error("Error parsing mode filter requirement on resource %s: %s", resource.getUrl(), modeRequire.getFilter());

Examples of ai.test.comment.CommentGraph.EdgeBase.match()

          throw exc;
        }
        for (int i = 0; i < commentEdges.size(); i++) {
          EdgeBase commentEdge = commentEdges.get(i);
          CFGSingleEdge cfgEdge = cfgEdges.get(i);
          commentEdge.match(cfgEdge, variablesMap);
//          if (var != null)
//            variablesMap.put(var.left, var.right);
          compare(commentEdge, cfgEdge);
        }
      }

Examples of aterm.ATerm.match()

  public int getPatternType() {
    ATerm match_pattern = buildMatchPattern();

    if (match_pattern.getType() == ATerm.PLACEHOLDER) {
      ATerm ph = ((ATermPlaceholder) match_pattern).getPlaceholder();
      if (ph.match("int") != null) {
        return ATerm.INT;
      } else if (ph.match("real") != null) {
        return ATerm.REAL;
      } else if (ph.match("str") != null) {
        return ATerm.APPL;

Examples of chunmap.model.relate.IntersectionMatrix.match()

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, pg).getIM();
    IntersectionMatrix rt2 = ComputeImFactory.getInstance().getImComputer(p2, pg).getIM();

    assertTrue(rt.match(IntersectionMatrix.WithinsPattern));
    assertFalse(rt2.match(IntersectionMatrix.WithinsPattern));
    assertTrue(rt2.match(IntersectionMatrix.DisjointPattern));

  }

  @Test

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.match()

    public void test_alter_first() throws Exception {
        String sql = "ALTER TABLE `test`.`tb1` CHANGE COLUMN `fid` `fid` INT(11) NOT NULL DEFAULT NULL, ADD PRIMARY KEY (`fid`) ;";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(stmt);
        Assert.assertEquals("ALTER TABLE `test`.`tb1`" + //
                            "\n\tCHANGE COLUMN `fid` `fid` INT(11) NULL NOT NULL,\n\t" + //
                            "ADD PRIMARY KEY (`fid`)", output);
    }

Examples of com.alibaba.druid.sql.dialect.odps.parser.OdpsStatementParser.match()

    public void test_0() throws Exception {
        String sql = "show partitions secods.xxx";
        OdpsStatementParser parser = new OdpsStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toOdpsString(stmt);
        Assert.assertEquals("SHOW PARTITIONS secods.xxx", output);
    }
}

Examples of com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.match()

    public void test_alter_constraint() throws Exception {
        String sql = "alter table TUSER drop constraint UK_084c17821a8f47e8b31fbb126b6";
        OracleStatementParser parser = new OracleStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);

        OracleSchemaStatVisitor visitor = new OracleSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());

Examples of com.alibaba.druid.sql.dialect.sqlserver.parser.SQLServerStatementParser.match()

    public void test_alter_first() throws Exception {
        String sql = "ALTER TABLE dbo.doc_exa ADD column_b VARCHAR(20) NULL ;";
        SQLServerStatementParser parser = new SQLServerStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);

        SQLServerSchemaStatVisitor visitor = new SQLServerSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());

Examples of com.aragost.javahg.internals.HgInputStream.match()

     */
    public List<Bookmark> list() {
        Repository repo = getRepository();
        HgInputStream stream = launchStream();
        try {
            if (stream.match(NO_BOOKMARKS)) {
                stream.consumeAll();
                return Collections.emptyList();
            }
            List<Bookmark> result = Lists.newArrayList();
            while (stream.peek() != -1) {

Examples of com.bazaarvoice.jolt.common.pathelement.MatchablePathElement.match()

        AssertJUnit.assertEquals"tuna-A-marlin-AAA", lpe.getSubKeyRef( 0 ) );
        AssertJUnit.assertEquals( 3, lpe.getSubKeyCount() );
        AssertJUnit.assertEquals( "A" , lpe.getSubKeyRef( 1 ) );
        AssertJUnit.assertEquals( "AAA" , lpe.getSubKeyRef( 2 ) );

        LiteralPathElement lpe2 = pe2.match( "rating-BBB", new WalkedPath( null, lpe ) );
        AssertJUnit.assertEquals"rating-BBB", lpe2.getRawKey() );
        AssertJUnit.assertEquals"rating-BBB", lpe2.getSubKeyRef( 0 ) );
        AssertJUnit.assertEquals( 2, lpe2.getSubKeyCount() );
        AssertJUnit.assertEquals( "BBB" , lpe2.getSubKeyRef( 1 ) );
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.