Examples of match()


Examples of mage.filter.FilterCard.match()

                filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
            }
            Cards cards = new CardsImpl();
            while (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().removeFromTop(game);
                if (filter.match(card, source.getSourceId(), source.getControllerId(), game)) {
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    break;
                }
                cards.add(card);
            }

Examples of mage.filter.FilterSpell.match()

                if (event.getType() == GameEvent.EventType.SPELL_CAST) {
                    FilterSpell filter = new FilterSpell();
                    filter.add(new ControllerPredicate(TargetController.YOU));
                    filter.add(new SubtypePredicate(subtype));
                    Spell spell = game.getStack().getSpell(event.getTargetId());
                    if (spell != null && filter.match(spell, controllerId, game)) {
                        return true;
                    }
                }
            }
        }

Examples of mage.filter.common.FilterBasicLandCard.match()

            Filter filter = new FilterBasicLandCard();
            do {
                card = library.removeFromTop(game);
                if (card != null) {
                   
                    if (filter.match(card, game)) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    } else {
                        cards.add(card);
                    }
                }

Examples of mage.filter.common.FilterCreatureForCombatBlock.match()

            } else if (response.getUUID() != null) {
                Permanent blocker = game.getPermanent(response.getUUID());
                if (blocker != null) {
                    boolean removeBlocker = false;
                    // does not block yet and can block or can block more attackers
                    if (filter.match(blocker, null, playerId, game)) {                       
                        selectCombatGroup(defendingPlayerId, blocker.getId(), game);
                    } else {
                        if (filterBlock.match(blocker, null, playerId, game) && game.getStack().isEmpty()) {
                            removeBlocker = true;
                        }                           

Examples of mondrian.olap.Util.ByteMatcher.match()

            new byte[] {(byte)0x2B, (byte)0x2A, (byte)0x2C};
        final byte[] bytesPresentLast =
            new byte[] {(byte)0x2B, (byte)0x2C, (byte)0x2A};
        final byte[] bytesPresentFirst =
                new byte[] {(byte)0x2A, (byte)0x2C, (byte)0x2B};
        assertEquals(-1, bm.match(bytesNotPresent));
        assertEquals(1, bm.match(bytesPresent));
        assertEquals(2, bm.match(bytesPresentLast));
        assertEquals(0, bm.match(bytesPresentFirst));
    }

Examples of net.augeas.Augeas.match()

        Augeas augeas = null;
        try {
            augeas = serverComponent.getAugeas();

            if (augeas!=null) {
                List<String> matches = augeas.match("/files/etc/samba/smb.conf/target[. != 'global']");
                for (String match : matches) {
                    String name = augeas.get(match);
                    Configuration pluginConfig = discoveryContext.getDefaultPluginConfiguration();
                    pluginConfig.put(new PropertySimple("targetName", name));
                    DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(),

Examples of net.bpiwowar.mg4j.extensions.utils.ByteMatch.match()

        int newlines = 0;
        start = 0;
        for (; start < content.length; ++start) {
            byte b = content[start];
            if (match.match(b)) {
                // Read the rest of the line
                int start = ++this.start;
                for (++this.start; this.start < content.length; ++this.start) {
                    b = content[this.start];
                    if (b == '\n') {

Examples of net.paoding.rose.web.impl.mapping.MappingNode.match()

        }
        MappingNode tree = inv.getRose().getMappingTree();
        RequestPath testPath = new RequestPath(//
                testMethod, testUri, curpath.getCtxpath(), curpath.getDispatcher());
        //
        ArrayList<MatchResult> matchResults = tree.match(testPath);
        if (matchResults == null) {
            // not rose uri
            return ("@404: <br>not rose uri: '" + testUri + "'");
        }

Examples of net.pms.formats.DVRMS.match()

    // DVRMS: false
    DLNAMediaInfo info = new DLNAMediaInfo();
    info.setContainer("dvr");
    Format format = new DVRMS();
    format.match("test.dvr");
    assertEquals("isCompatible() gives same outcome as ps3compatible() for DVRMS",
        format.ps3compatible(),  conf.isCompatible(info, format));

    // ISO: false
    info = new DLNAMediaInfo();

Examples of net.pms.formats.Format.match()

    // Construct GIF information
    DLNAMediaInfo info = new DLNAMediaInfo();
    info.setContainer("gif");
    Format format = new GIF();
    format.match("test.gif");
    assertEquals("PS3 is compatible with GIF", true,
        conf.isCompatible(info, format));
  }

  /**
 
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.