mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
add missing diamond operators
This commit is contained in:
parent
45f665eb1d
commit
553d263526
20 changed files with 24 additions and 24 deletions
|
@ -245,7 +245,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
setSortKeys(null);
|
||||
} else {
|
||||
// setup sort on first click
|
||||
ArrayList list = new ArrayList();
|
||||
List<SortKey> list = new ArrayList<>();
|
||||
list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));
|
||||
list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));
|
||||
setSortKeys(list);
|
||||
|
@ -293,7 +293,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
});
|
||||
|
||||
// default sort by created date (last games from above)
|
||||
ArrayList list = new ArrayList();
|
||||
ArrayList list = new ArrayList<>();
|
||||
list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));
|
||||
list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));
|
||||
activeTablesSorter.setSortKeys(list);
|
||||
|
@ -310,7 +310,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_START).setCellRenderer(datetimeCellRenderer);
|
||||
tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_END).setCellRenderer(datetimeCellRenderer);
|
||||
// default sort by ended date (last games from above)
|
||||
ArrayList list2 = new ArrayList();
|
||||
ArrayList list2 = new ArrayList<>();
|
||||
list2.add(new RowSorter.SortKey(MatchesTableModel.COLUMN_END, SortOrder.DESCENDING));
|
||||
completedTablesSorter.setSortKeys(list2);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||
*/
|
||||
public class AusHighlander extends Constructed {
|
||||
|
||||
public static final Map<String, Integer> pointMap = new HashMap();
|
||||
public static final Map<String, Integer> pointMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
pointMap.put("Ancestral Recall", 4);
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||
*/
|
||||
public class CanadianHighlander extends Constructed {
|
||||
|
||||
public static final Map<String, Integer> pointMap = new HashMap();
|
||||
public static final Map<String, Integer> pointMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
pointMap.put("Ancestral Recall", 7);
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Standard extends Constructed {
|
|||
}
|
||||
|
||||
public static List<String> makeLegalSets() {
|
||||
List<String> codes = new ArrayList();
|
||||
List<String> codes = new ArrayList<>();
|
||||
GregorianCalendar current = new GregorianCalendar();
|
||||
List<ExpansionSet> sets = new ArrayList(Sets.getInstance().values());
|
||||
Collections.sort(sets, new Comparator<ExpansionSet>() {
|
||||
|
|
|
@ -75,7 +75,7 @@ class CurseOfBountyEffect extends OneShotEffect {
|
|||
if (enchantment != null) {
|
||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (enchantedPlayer != null) {
|
||||
Set<UUID> players = new HashSet();
|
||||
Set<UUID> players = new HashSet<>();
|
||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||
if (defender.equals(enchantedPlayer.getId())
|
||||
|
|
|
@ -76,7 +76,7 @@ class CurseOfDisturbanceEffect extends OneShotEffect {
|
|||
if (enchantment != null) {
|
||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (enchantedPlayer != null) {
|
||||
Set<UUID> players = new HashSet();
|
||||
Set<UUID> players = new HashSet<>();
|
||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||
if (defender.equals(enchantedPlayer.getId())
|
||||
|
|
|
@ -74,7 +74,7 @@ class CurseOfVerbosityEffect extends OneShotEffect {
|
|||
if (enchantment != null) {
|
||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (enchantedPlayer != null) {
|
||||
Set<UUID> players = new HashSet();
|
||||
Set<UUID> players = new HashSet<>();
|
||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||
if (defender.equals(enchantedPlayer.getId())
|
||||
|
|
|
@ -74,7 +74,7 @@ class CurseOfVitalityEffect extends OneShotEffect {
|
|||
if (enchantment != null) {
|
||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (enchantedPlayer != null) {
|
||||
Set<UUID> players = new HashSet();
|
||||
Set<UUID> players = new HashSet<>();
|
||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||
if (defender.equals(enchantedPlayer.getId())
|
||||
|
|
|
@ -92,7 +92,7 @@ class DispersalEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Set<PermanentIdPredicate> permsToReturn = new HashSet();
|
||||
Set<PermanentIdPredicate> permsToReturn = new HashSet<>();
|
||||
for (UUID opponentId : game.getOpponents(player.getId())) {
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent == null) {
|
||||
|
|
|
@ -51,7 +51,7 @@ class EndlessAtlasCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Map<String, Integer> landMap = new HashMap();
|
||||
Map<String, Integer> landMap = new HashMap<>();
|
||||
for (Permanent land : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND,
|
||||
source.getControllerId(), game
|
||||
|
|
|
@ -153,7 +153,7 @@ class AnyColorLandsProduceManaEffect extends ManaEffect {
|
|||
@Override
|
||||
public List<Mana> getNetMana(Game game, Ability source) {
|
||||
int manaAmount = getManaAmount(game, source);
|
||||
List<Mana> netManas = new ArrayList();
|
||||
List<Mana> netManas = new ArrayList<>();
|
||||
Mana types = getManaTypes(game, source);
|
||||
if (types.getRed() > 0) {
|
||||
netManas.add(new Mana(manaAmount, 0, 0, 0, 0, 0, 0, 0));
|
||||
|
|
|
@ -67,7 +67,7 @@ enum LilianasContractCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Set<String> demonNames = new HashSet();
|
||||
Set<String> demonNames = new HashSet<>();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||
if (permanent == null
|
||||
|| !permanent.isControlledBy(source.getControllerId())
|
||||
|
|
|
@ -110,7 +110,7 @@ class LumberingBattlementEffect extends OneShotEffect {
|
|||
if (!player.choose(Outcome.Neutral, target, source.getSourceId(), game)) {
|
||||
return false;
|
||||
}
|
||||
Set<Card> cards = new HashSet();
|
||||
Set<Card> cards = new HashSet<>();
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
|
|
|
@ -177,7 +177,7 @@ class MnemonicBetrayalAnyColorEffect extends AsThoughEffectImpl implements AsTho
|
|||
class MnemonicBetrayalDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
private final Cards cards;
|
||||
private final Map<UUID, Integer> cardMap = new HashMap();
|
||||
private final Map<UUID, Integer> cardMap = new HashMap<>();
|
||||
|
||||
public MnemonicBetrayalDelayedTriggeredAbility(Cards cards, Map<UUID, Integer> cardMap) {
|
||||
super(new MnemonicBetrayalReturnEffect(cards, cardMap));
|
||||
|
@ -224,7 +224,7 @@ class MnemonicBetrayalDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
|||
class MnemonicBetrayalReturnEffect extends OneShotEffect {
|
||||
|
||||
private final Cards cards;
|
||||
private final Map<UUID, Integer> cardMap = new HashMap();
|
||||
private final Map<UUID, Integer> cardMap = new HashMap<>();
|
||||
|
||||
public MnemonicBetrayalReturnEffect(Cards cards, Map<UUID, Integer> cardMap) {
|
||||
super(Outcome.Benefit);
|
||||
|
|
|
@ -91,7 +91,7 @@ enum PalladiaMorsTheRuinerCondition implements Condition {
|
|||
|
||||
class PalladiaMorsTheRuinerWatcher extends Watcher {
|
||||
|
||||
private final Set<MageObjectReference> damagers = new HashSet();
|
||||
private final Set<MageObjectReference> damagers = new HashSet<>();
|
||||
|
||||
public PalladiaMorsTheRuinerWatcher() {
|
||||
super(PalladiaMorsTheRuinerWatcher.class, WatcherScope.GAME);
|
||||
|
|
|
@ -116,7 +116,7 @@ class TuvasaTheSunlitTriggeredAbility extends SpellCastControllerTriggeredAbilit
|
|||
|
||||
class TuvasaTheSunlitWatcher extends Watcher {
|
||||
|
||||
private final Map<UUID, UUID> firstEnchantmentThisTurn = new HashMap();
|
||||
private final Map<UUID, UUID> firstEnchantmentThisTurn = new HashMap<>();
|
||||
|
||||
public TuvasaTheSunlitWatcher() {
|
||||
super(TuvasaTheSunlitWatcher.class, WatcherScope.GAME);
|
||||
|
|
|
@ -128,7 +128,7 @@ class VaevictisAsmadiTheDireEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<Player> playersToFlip = new ArrayList();
|
||||
List<Player> playersToFlip = new ArrayList<>();
|
||||
for (Target target : source.getTargets()) {
|
||||
for (UUID permId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(permId);
|
||||
|
|
|
@ -36,7 +36,7 @@ public class LoadPhaseManager {
|
|||
|
||||
private static Map<PhaseStep, Boolean> skipYou;
|
||||
static {
|
||||
skipYou = new HashMap() {{
|
||||
skipYou = new HashMap<>() {{
|
||||
put(PhaseStep.UPKEEP, true);
|
||||
put(PhaseStep.PRECOMBAT_MAIN, true);
|
||||
put(PhaseStep.BEGIN_COMBAT, true);
|
||||
|
@ -50,7 +50,7 @@ public class LoadPhaseManager {
|
|||
|
||||
private static Map<PhaseStep, Boolean> skipOthers;
|
||||
static {
|
||||
skipYou = new HashMap() {{
|
||||
skipYou = new HashMap<>() {{
|
||||
put(PhaseStep.UPKEEP, true);
|
||||
put(PhaseStep.PRECOMBAT_MAIN, true);
|
||||
put(PhaseStep.BEGIN_COMBAT, true);
|
||||
|
|
|
@ -19,7 +19,7 @@ import mage.players.Player;
|
|||
*/
|
||||
public class ChooseModeEffect extends OneShotEffect {
|
||||
|
||||
protected final List<String> modes = new ArrayList();
|
||||
protected final List<String> modes = new ArrayList<>();
|
||||
protected final String choiceMessage;
|
||||
|
||||
public ChooseModeEffect(String choiceMessage, String... modes) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.UUID;
|
|||
public abstract class Designation implements MageObject {
|
||||
|
||||
private static EnumSet emptySet = EnumSet.noneOf(CardType.class);
|
||||
private static List emptyList = new ArrayList();
|
||||
private static List emptyList = new ArrayList<>();
|
||||
private static ObjectColor emptyColor = new ObjectColor();
|
||||
private static ManaCostsImpl emptyCost = new ManaCostsImpl();
|
||||
|
||||
|
|
Loading…
Reference in a new issue