forked from External/mage
Few lambda's and removed explicit type from creating lists and hashmaps
This commit is contained in:
parent
0a3c95dde5
commit
11dc1e10f1
130 changed files with 725 additions and 1105 deletions
|
|
@ -27,13 +27,6 @@
|
|||
*/
|
||||
package mage.cards;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.EnumMap;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import mage.cards.repository.CardCriteria;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
|
|
@ -41,6 +34,9 @@ import mage.constants.Rarity;
|
|||
import mage.constants.SetType;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -403,13 +399,7 @@ public abstract class ExpansionSet implements Serializable {
|
|||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
// Workaround after card number is numeric
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
Iterator<CardInfo> iterator = savedCardsInfos.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
CardInfo next = iterator.next();
|
||||
if (Integer.valueOf(next.getCardNumber()) > maxCardNumberInBooster && !rarity.equals(Rarity.LAND)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
savedCardsInfos.removeIf(next -> Integer.valueOf(next.getCardNumber()) > maxCardNumberInBooster && !rarity.equals(Rarity.LAND));
|
||||
}
|
||||
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue