Examples of matches()


Examples of freenet.io.Inet6AddressMatcher.matches()

*/
public class Inet6AddressMatcherTest extends TestCase {

  public void test() throws Exception {
    Inet6AddressMatcher matcher = new Inet6AddressMatcher("0:0:0:0:0:0:0:0/0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));

Examples of games.stendhal.common.parser.Expression.matches()

    m1 = ConversationParser.parseAsMatcher("|TYPE|done/VER-PAS");
    assertFalse(m1.hasError());
    assertEquals("|TYPE|done/VER-PAS", m1.toString());
    e1 = m1.getTriggerExpression();

    assertFalse(e2.matches(e1));
    assertFalse(e2.matchesNormalized(e1));

    // ...but "done" matches the given type string pattern.
    s = ConversationParser.parse("done");
    assertFalse(s.hasError());

Examples of games.stendhal.server.entity.item.HouseKey.matches()

        if (!(object instanceof HouseKey)) {
          continue;
        }

        final HouseKey key = (HouseKey) object;
        if (key.matches(getDoorId(), getLockNumber())) {
          // TODO: Remove the key naming support, and just return. 
          // The renaming code does not need to be here forever, just some
          // months, so that most of the player's keys get tagged with
          // an owner. Comment added 2009-03-13
          key.setup(getDoorId(), getLockNumber(), getOwner());

Examples of gnu.javax.swing.text.html.parser.support.low.pattern.matches()

    rt.reset(new StringReader(x));

    assertFalse(a.matches(rt));
    assertFalse(b.matches(rt));
    assertTrue(c.matches(rt));
    assertFalse(d.matches(rt));
  }

  public void testReadingAndAhead()
                           throws Exception
  {

Examples of gov.nasa.jpf.util.MethodSpec.matches()

  String[] builtinFiltered = {"java.lang.ClassLoader.*"};
 
  private boolean isAllowed(MethodInfo mi){
    for(String spec : builtinFiltered){
      MethodSpec ms = MethodSpec.createMethodSpec(spec);
      if (ms.matches(mi)){
        return false;
      }
    }

    return true;

Examples of groovy.xml.QName.matches()

            if (child instanceof Node) {
                Node childNode = (Node) child;
                Object childNodeName = childNode.name();
                if (childNodeName instanceof QName) {
                    QName qn = (QName) childNodeName;
                    if (qn.matches(name)) {
                        answer.add(childNode);
                    }
                } else if (name.equals(childNodeName)) {
                    answer.add(childNode);
                }

Examples of hampi.constraints.Regexp.matches()

  public void testMultiCharTerminals() throws Exception{
    Grammar g = new Parser(GrammarTests.DIR + "test_multiCharTerminal.txt").parse();
    GrammarStringBounder gsb = new GrammarStringBounder();
    Regexp boundedRegexp = gsb.getBoundedRegexp(g, "program", 3, false);
    System.out.println(boundedRegexp);
    assertTrue(!boundedRegexp.matches("AB__"));
    assertTrue(boundedRegexp.matches("AB_"));
  }

  public void test1() throws Exception{
    Grammar g = new Parser(GrammarTests.DIR + "test_generate_parent.txt").parse();

Examples of invtweaks.InvTweaksItemTree.matches()

                InvTweaksItemTree tree = config.getTree();
                ItemStack stack = containerMgr.getItemStack(currentSlot);
                List<InvTweaksItemTreeItem> items = tree.getItems(getItemID(stack),
                        getItemDamage(stack));
                for (InvTweaksConfigSortingRule rule : config.getRules()) {
                    if (tree.matches(items, rule.getKeyword())) {
                        for (int slot : rule.getPreferredSlots()) {
                            prefferedPositions.add(slot);
                        }
                    }
                }

Examples of io.druid.query.filter.ValueMatcher.matches()

    return new ValueMatcher()
    {
      @Override
      public boolean matches()
      {
        return !baseMatcher.matches();
      }
    };
  }
}

Examples of io.fabric8.agent.resolver.RequirementImpl.matches()

            SimpleFilter sf = (filter != null)
                    ? SimpleFilter.parse(filter)
                    : new SimpleFilter(null, null, SimpleFilter.MATCH_ALL);
            br = new RequirementImpl(null, requirement.getNamespace(), requirement.getDirectives(), requirement.getAttributes(), sf);
        }
        return br.matches(capability);
    }
}
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.