Examples of matches()


Examples of micdoodle8.mods.galacticraft.api.recipe.SpaceStationRecipe.matches()

            {
                if (this.selectedBody == GalacticraftCore.planetOverworld && this.canCreateSpaceStation())
                {
                    final SpaceStationRecipe recipe = WorldUtil.getSpaceStationRecipe(this.selectedBody.getDimensionID());

                    if (recipe != null && recipe.matches(this.mc.thePlayer, false))
                    {
                        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_BIND_SPACE_STATION_ID, new Object[] { this.selectedBody.getDimensionID() }));
                        //Zoom in on Overworld to show the new SpaceStation if not already zoomed
                        if (this.selectionCount < 2)
                        {

Examples of models.Rule.matches()

        Rule r = new Rule();
        r.pattern = "foo";
        r.type = RuleType.NAME_CONTAINS;
        r.dest = "/tmp";

        assertFalse(r.matches("bar"));
        assertTrue(r.matches("foobar"));
        assertTrue(r.matches("barfoo"));
    }

    @Test

Examples of net.glowstone.inventory.MaterialMatcher.matches()

    public Collection<ItemStack> getDrops(GlowBlock block, ItemStack tool) {
        LinkedList<ItemStack> drops = new LinkedList<>();

        MaterialMatcher neededTool = getNeededMiningTool(block);
        if (neededTool == null ||
                (tool != null && neededTool.matches(tool.getType()))) {
            drops.addAll(getBlockDrops(block));
        }

        for (ItemStack i : ((TEContainer) block.getTileEntity()).getInventory().getContents()) {
            if (i != null) {

Examples of net.mcft.copy.betterstorage.api.crafting.IRecipeInput.matches()

      if (required != null) {
        int currentAmount = 0;
        if ((stack != null) && simulate)
          stack = craftSlot(stack, required, null, true);
        if (stack != null) {
          if (!required.matches(stack)) return false;
          currentAmount = stack.stackSize;
        }
        int requiredAmount = (required.getAmount() - currentAmount);
        if (requiredAmount <= 0) continue;
        for (int j = 0; j < contents.length; j++) {

Examples of net.mcft.copy.betterstorage.misc.ItemIdentifier.matches()

    Queue<Integer> emptySlots = new LinkedList<Integer>();
   
    for (int slot = 0; slot < tempContents.length; slot++) {
      ItemStack stack = tempContents[slot];
      if (stack == null) { emptySlots.add(slot); continue; }
      if (!item.matches(stack)) continue;
      amount -= modifyItemsInSlot(slot, stack, itemData, amount);
      if (amount == 0) return;
    }
   
    while ((amount > 0) && (emptySlots.size() > 0))

Examples of net.minecraft.item.crafting.IRecipe.matches()

    } else {
      IRecipe recipe;
      for (int i = 0; i < CraftingManager.getInstance().getRecipeList().size(); i++) {
        recipe = (IRecipe) CraftingManager.getInstance().getRecipeList().get(i);

        if (recipe.matches(inv, world)) {
          return recipe.getCraftingResult(inv);
        }
      }
      return null;
    }

Examples of net.sf.kpex.prolog.Term.matches()

      if (null == result)
      {
        break;
      }
      // IO.trace("$$After pick: t="+t+this);
      if (result.matches(pattern))
      {
        break;
      }
      else
      {

Examples of net.sf.regain.crawler.config.UrlMatcher.matches()

    mLog.debug("isUrlAccepted for url: " + url);
    // check whether this URL matches to a white list prefix
    for (int i = 0; i < mWhiteListEntryArr.length; i++) {
      if (mWhiteListEntryArr[i].shouldBeUpdated()) {
        UrlMatcher matcher = mWhiteListEntryArr[i].getUrlMatcher();
        if (matcher.matches(url)) {
          // get the values for link extraction and indexing
          // from the current matcher hit
          urlMatchResult.setShouldBeParsed(matcher.getShouldBeParsed());
          urlMatchResult.setShouldBeIndexed(matcher.getShouldBeIndexed());
          mLog.debug("Whitelist matches for url: " + url);

Examples of net.sf.saxon.pattern.ContentTypeTest.matches()

    public boolean isId() {
        ContentTypeTest idTest =
                new ContentTypeTest(Type.ATTRIBUTE, BuiltInAtomicType.ID, node.getConfiguration());
        idTest.setMatchDTDTypes(true);
        return idTest.matches(node);
    }


    /**
     * The <code>Element</code> node this attribute is attached to or

Examples of net.sf.saxon.pattern.NodeTest.matches()

    MatchContext newContext = new MatchContext();
    if (mc.elementArcs != null) {
      for (PathMapArc arc : mc.elementArcs) {
        AxisExpression ae = arc.getStep();
        NodeTest test = ae.getNodeTest();
        if (test == null || test.matches(Type.ELEMENT, nameCode, typeCode)) {
          newContext.bulidContext(arc.getTarget());
          newContext.matchedElement = true;
        }
        if (ae.getAxis() == Axis.DESCENDANT || ae.getAxis() == Axis.DESCENDANT_OR_SELF) {
          newContext.processArc(arc);
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.