removed autoboxing :

Boolean -> boolean
Integer -> int
Float -> float
This commit is contained in:
ingmargoudt 2017-03-11 15:17:14 +01:00
parent 4b5378c423
commit 1f215cdbe3
51 changed files with 110 additions and 110 deletions

View file

@ -39,7 +39,7 @@ import mage.game.Game;
public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
private Duration duration;
private Boolean triggerOnlyOnce;
private boolean triggerOnlyOnce;
public DelayedTriggeredAbility(Effect effect) {
this(effect, Duration.EndOfGame);
@ -49,11 +49,11 @@ public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
this(effect, duration, true);
}
public DelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce) {
public DelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce) {
this(effect, duration, triggerOnlyOnce, false);
}
public DelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce, boolean optional) {
public DelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce, boolean optional) {
super(Zone.ALL, effect, optional);
this.duration = duration;
this.triggerOnlyOnce = triggerOnlyOnce;
@ -72,7 +72,7 @@ public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
return duration;
}
public Boolean getTriggerOnlyOnce() {
public boolean getTriggerOnlyOnce() {
return triggerOnlyOnce;
}

View file

@ -40,7 +40,7 @@ import mage.game.stack.Spell;
*/
public class BecomesTargetControllerSpellTriggeredAbility extends TriggeredAbilityImpl {
public BecomesTargetControllerSpellTriggeredAbility(Effect effect, Boolean optional) {
public BecomesTargetControllerSpellTriggeredAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
}

View file

@ -20,11 +20,11 @@ public class DiscardsACardOpponentTriggeredAbility extends TriggeredAbilityImpl
private SetTargetPointer setTargetPointer;
public DiscardsACardOpponentTriggeredAbility(Effect effect, Boolean isOptional) {
public DiscardsACardOpponentTriggeredAbility(Effect effect, boolean isOptional) {
this(effect, isOptional, SetTargetPointer.NONE);
}
public DiscardsACardOpponentTriggeredAbility(Effect effect, Boolean isOptional, SetTargetPointer setTargetPointer) {
public DiscardsACardOpponentTriggeredAbility(Effect effect, boolean isOptional, SetTargetPointer setTargetPointer) {
super(Zone.BATTLEFIELD, effect, isOptional);
this.setTargetPointer = setTargetPointer;
}

View file

@ -50,11 +50,11 @@ public class LandfallAbility extends TriggeredAbilityImpl {
this(Zone.BATTLEFIELD, effect, optional);
}
public LandfallAbility(Zone zone, Effect effect, Boolean optional) {
public LandfallAbility(Zone zone, Effect effect, boolean optional) {
this(zone, effect, optional, SetTargetPointer.NONE);
}
public LandfallAbility(Zone zone, Effect effect, Boolean optional, SetTargetPointer setTargetPointer) {
public LandfallAbility(Zone zone, Effect effect, boolean optional, SetTargetPointer setTargetPointer) {
super(zone, effect, optional);
this.setTargetPointer = setTargetPointer;
}

View file

@ -20,7 +20,7 @@ public class AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility extends DelayedTr
this(effect, Duration.Custom, true);
}
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce) {
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce) {
super(effect, duration, triggerOnlyOnce);
}

View file

@ -38,7 +38,7 @@ import mage.game.permanent.Permanent;
*/
public class TransformedCondition implements Condition {
protected Boolean notCondition;
protected boolean notCondition;
public TransformedCondition() {
this(false);
@ -50,7 +50,7 @@ public class TransformedCondition implements Condition {
* @param notCondition if true the condition is true when the permanent is not transformed
* @return true if the condition is true, false if the condition is false
*/
public TransformedCondition(Boolean notCondition) {
public TransformedCondition(boolean notCondition) {
this.notCondition = notCondition;
}

View file

@ -13,7 +13,7 @@ import mage.game.permanent.Permanent;
*/
public class DomainValue implements DynamicValue {
private Integer amount;
private int amount;
private boolean countTargetPlayer;
private UUID playerId;
@ -25,16 +25,16 @@ public class DomainValue implements DynamicValue {
this(1, countTargetPlayer);
}
public DomainValue(Integer amount) {
public DomainValue(int amount) {
this(amount, false);
}
public DomainValue(Integer amount, boolean countTargetPlayer) {
public DomainValue(int amount, boolean countTargetPlayer) {
this.amount = amount;
this.countTargetPlayer = countTargetPlayer;
}
public DomainValue(Integer amount, UUID playerId) {
public DomainValue(int amount, UUID playerId) {
this(amount, false);
this.playerId = playerId;
}
@ -89,10 +89,10 @@ public class DomainValue implements DynamicValue {
@Override
public String toString() {
return amount.toString();
return String.valueOf(amount);
}
public Integer getAmount() {
public int getAmount() {
return amount;
}

View file

@ -50,7 +50,7 @@ public class CounterTargetAndSearchGraveyardHandLibraryEffect extends SearchTarg
this(false,"its controller's", "all cards with the same name as that spell" );
}
public CounterTargetAndSearchGraveyardHandLibraryEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
public CounterTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
super(graveyardExileOptional, searchWhatText, searchForText);
}

View file

@ -42,7 +42,7 @@ import mage.target.TargetPermanent;
*/
public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
public ExileTargetAndSearchGraveyardHandLibraryEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
public ExileTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
super(graveyardExileOptional, searchWhatText, searchForText);
}

View file

@ -57,9 +57,9 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
* Sowing Salt
* 2/1/2005: The copies must be found if they are in publicly viewable zones. Finding copies while searching private zones is optional.
*/
protected Boolean graveyardExileOptional;
protected boolean graveyardExileOptional;
public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
super(Outcome.Exile);
this.searchWhatText = searchWhatText;
this.searchForText = searchForText;

View file

@ -20,7 +20,7 @@ public class DekDeckImporter extends DeckImporter {
// e.g. <Cards CatID="61202" Quantity="1" Sideboard="false" Name="Vildin-Pack Outcast" />
Integer cardCount = Integer.parseInt(extractAttribute(line, "Quantity"));
String cardName = extractAttribute(line, "Name");
Boolean isSideboard = "true".equals(extractAttribute(line, "Sideboard"));
boolean isSideboard = "true".equals(extractAttribute(line, "Sideboard"));
CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardName, true);
if (cardInfo == null) {
sbMessage.append("Could not find card: '").append(cardName).append("' at line ").append(lineCount).append('\n');

View file

@ -45,13 +45,13 @@ public class AbilityApplier extends ApplyToPermanent {
}
@Override
public Boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent) {
permanent.addAbility(ability, game);
return true;
}
@Override
public Boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject) {
mageObject.getAbilities().add(ability);
return true;
}

View file

@ -22,7 +22,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
public Boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent) {
if (!permanent.getSubtype(game).contains(subtype)) {
permanent.getSubtype(game).add(subtype);
}
@ -30,7 +30,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
public Boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject) {
if (!mageObject.getSubtype(game).contains(subtype)) {
mageObject.getSubtype(game).add(subtype);
}

View file

@ -36,5 +36,5 @@ import mage.game.Game;
*/
public abstract class ApplyToMageObject {
public abstract Boolean apply(Game game, MageObject mageObject);
public abstract boolean apply(Game game, MageObject mageObject);
}

View file

@ -9,5 +9,5 @@ import mage.game.permanent.Permanent;
*/
public abstract class ApplyToPermanent extends ApplyToMageObject implements Serializable {
public abstract Boolean apply(Game game, Permanent permanent);
public abstract boolean apply(Game game, Permanent permanent);
}

View file

@ -45,7 +45,7 @@ public class CardTypeApplier extends ApplyToPermanent {
}
@Override
public Boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent) {
if (!permanent.getCardType().contains(cardType)) {
permanent.getCardType().add(cardType);
}
@ -53,7 +53,7 @@ public class CardTypeApplier extends ApplyToPermanent {
}
@Override
public Boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject) {
if (!mageObject.getCardType().contains(cardType)) {
mageObject.getCardType().add(cardType);
}

View file

@ -10,13 +10,13 @@ import mage.game.permanent.Permanent;
public class EmptyApplyToPermanent extends ApplyToPermanent {
@Override
public Boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent) {
// do nothing
return true;
}
@Override
public Boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject) {
return true;
}