Examples of matches()


Examples of aQute.lib.osgi.Instruction.matches()

    }

    private PackageDefinition overridePackageDefinitionResolution(PackageDefinition packageDefinition) {
        for (InstructionDefinition instructionDefinition : importOverrideInstructions) {
            Instruction instruction = instructionDefinition.instruction;
            boolean instructed = !instruction.isNegated() == instruction.matches(packageDefinition.packageName);
            if (instructed) {
                System.out.println("Instruction '" + instruction + "' -> package '" + packageDefinition.packageName + "'");

                PackageDefinition override = instructionDefinition.packageDefinition;
                String packageName = packageDefinition.packageName;

Examples of aima.core.learning.inductive.DLTest.matches()

  public void testDLTestMatchSucceedsWithMatchedExample() throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();
    Example e = ds.getExample(0);
    DLTest test = new DLTest();
    test.add("type", "French");
    Assert.assertTrue(test.matches(e));
  }

  @Test
  public void testDLTestMatchFailsOnMismatchedExample() throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();

Examples of br.com.objectos.way.ui.RequestURIGrep.matches()

  public void equal_to() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .equalTo("/login")
        .build();

    assertThat(grep.matches("/login"), is(true));
    assertThat(grep.matches("/login/whatever"), is(false));
    assertThat(grep.matches("/log"), is(false));
  }

  public void ends_with() {

Examples of buildcraft.core.inventory.filters.ArrayStackFilter.matches()

        qty = stacks.get(0).stackSize;
        filter = new ArrayStackFilter(stacks.toArray(new ItemStack[stacks.size()]));
      }

      for (IInvSlot s : InventoryIterator.getIterable(inv)) {
        if (filter.matches(s.getStackInSlot())) {
          ItemStack removed = s.decreaseStackInSlot(qty);

          qty = qty - removed.stackSize;

          if (invCraft.getStackInSlot(i) != null) {

Examples of buildcraft.core.inventory.filters.StatementParameterStackFilter.matches()

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (actionClass.isAssignableFrom(s.statement.getClass())) {
        StatementParameterStackFilter param = new StatementParameterStackFilter(s.parameters);

        if (!param.hasFilter() || param.matches(filter)) {
          actionFound = true;
          break;
        }
      }
    }

Examples of ca.odell.glazedlists.impl.matchers.PropertyEventNameMatcher.matches()

        Matcher<PropertyChangeEvent> matcher = new PropertyEventNameMatcher(true, new String[] {"test", null});
        assertEquals(true, matcher.matches(event1));
        assertEquals(true, matcher.matches(event2));
        assertEquals(false, matcher.matches(event3));
        assertEquals(false, matcher.matches(event4));
        assertEquals(true, matcher.matches(event5));

        matcher = new PropertyEventNameMatcher(false, new String[] {"test", null});
        assertEquals(false, matcher.matches(event1));
        assertEquals(false, matcher.matches(event2));
        assertEquals(true, matcher.matches(event3));

Examples of cbg.editor.jedit.Mode.matches()

  private String filenameToModeName(String filename) {
    Mode[] localModes = getModeList();
    if(localModes == null) return null;
    for (int i = 0; i < localModes.length; i++) {
      Mode mode = localModes[i];
      if(mode.matches(filename)) return mode.getFilename();
    }
    return null;
  }

  /**
 

Examples of ch.entwine.weblounge.common.url.UrlMatcher.matches()

    // Nothing is in the cache, let's see if this is simply the first time
    // that this action is being called
    int maxMatchLength = 0;
    for (Entry<UrlMatcher, ActionPool> entry : actions.entrySet()) {
      UrlMatcher matcher = entry.getKey();
      if (matcher.matches(url, flavor)) {
        ActionPool pool = entry.getValue();
        int matchLength = matcher.getMountpoint().length();
        if (matchLength > maxMatchLength) {
          maxMatchLength = matchLength;
          actionPool = pool;

Examples of ch.inftec.ju.util.RegexUtil.matches()

    @Override
    public SchemaInfo getSchemaInfo() {
      if (this.connUtil.getDbType() == DbType.MYSQL) {
        // Get the Schema info from the URL (has the form jdbc:mysql://host/schema)
        RegexUtil ru = new RegexUtil(".*/([^/]+)");
        if (!ru.matches(this.getUrl())) {
          return null;
        } else {
          String schemaName = ru.getMatches(this.getUrl())[0].getGroups()[0];
          return new SchemaInfoImpl(schemaName, null);             
        }

Examples of client.net.sf.saxon.ce.regex.ARegularExpression.matches()

        }

        try {
            ARegularExpression re = new ARegularExpression(arg1.getStringValueCS(), flags.toString(), "XP20", null);
            // check that it's not a pattern that matches ""
            if (re.matches("")) {
                dynamicError(
                        "The regular expression in replace() must not be one that matches a zero-length string",
                        "FORX0003", c);
            }
            String input = arg0.getStringValue();
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.