Search in sources :

Example 1 with EVENT

use of org.magic.api.beans.MTGKeyWord.EVENT in project MtgDesktopCompanion by nicho92.

the class KeyWordProvider method getKeywordsFrom.

public Set<MTGKeyWord> getKeywordsFrom(MagicCard magicCard, EVENT... t) {
    Set<MTGKeyWord> s = getKeywordsFrom(magicCard);
    Set<MTGKeyWord> ret = new HashSet<>();
    for (MTGKeyWord k : s) for (EVENT ev : t) if (k.getEvent().equals(ev))
        ret.add(k);
    return ret;
}
Also used : MTGKeyWord(org.magic.api.beans.MTGKeyWord) EVENT(org.magic.api.beans.MTGKeyWord.EVENT) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Aggregations

HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 MTGKeyWord (org.magic.api.beans.MTGKeyWord)1 EVENT (org.magic.api.beans.MTGKeyWord.EVENT)1