replace equals(literal) with literal.equals

master
melvin 2012-10-03 13:01:32 +08:00
parent ac75f656e9
commit 6ea3e13a51
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ public enum MagicDeckConstructionRule {
final MagicCondensedDeck countedDeck = new MagicCondensedDeck(deck);
for(final MagicCondensedCardDefinition countedCard : countedDeck) {
if(countedCard.getNumCopies() > 4 && !countedCard.getCard().isBasic() && !countedCard.getCard().getName().equals("Relentless Rats")) {
if(countedCard.getNumCopies() > 4 && !countedCard.getCard().isBasic() && !"Relentless Rats".equals(countedCard.getCard().getName())) {
brokenRules.add(FourCopyLimit);
break;
}

View File

@ -160,7 +160,7 @@ public class MagicManaCost {
private void addType(final String typeText, final int[] XCountArr, final int[] convertedArr) {
final String symbol = typeText.substring(1, typeText.length() - 1);
if (symbol.equals("X")) {
if ("X".equals(symbol)) {
XCountArr[0]++;
} else if (isNumeric(symbol)) {
addType(MagicCostManaType.Colorless,Integer.parseInt(symbol),convertedArr);