From fde10788db2082e40b6ea1643b746f8051c0efc2 Mon Sep 17 00:00:00 2001 From: North Date: Thu, 20 Dec 2012 23:45:22 +0200 Subject: [PATCH] removed redundant modifiers from interfaces --- .../main/java/mage/client/util/Command.java | 3 +- .../mage/plugins/card/dl/beans/BoundBean.java | 9 +- .../card/dl/beans/properties/Properties.java | 19 +- .../card/dl/beans/properties/Property.java | 9 +- .../mage/plugins/card/utils/ImageManager.java | 31 +- .../src/mage/components/CardInfoPane.java | 5 +- Mage.Common/src/mage/interfaces/Action.java | 2 +- .../src/mage/interfaces/ActionWithResult.java | 4 +- .../src/mage/interfaces/MageClient.java | 12 +- .../interfaces/callback/CallbackClient.java | 3 +- .../src/main/java/mage/server/Room.java | 5 +- .../java/mage/server/game/GameCallback.java | 3 +- .../java/mage/server/game/GameController.java | 2 +- .../main/java/mage/server/game/GamesRoom.java | 24 +- .../java/mage/server/services/LogKeys.java | 26 +- Mage/src/mage/MageItem.java | 3 +- Mage/src/mage/MageObject.java | 34 +-- Mage/src/mage/abilities/Abilities.java | 38 +-- Mage/src/mage/abilities/Ability.java | 84 +++--- Mage/src/mage/abilities/ActivatedAbility.java | 4 +- Mage/src/mage/abilities/TriggeredAbility.java | 8 +- .../mage/abilities/costs/AlternativeCost.java | 5 +- Mage/src/mage/abilities/costs/Cost.java | 18 +- Mage/src/mage/abilities/costs/Costs.java | 6 +- .../costs/OptionalAdditionalCost.java | 20 +- .../mage/abilities/costs/VariableCost.java | 6 +- .../mage/abilities/costs/mana/ManaCost.java | 27 +- .../mage/abilities/costs/mana/ManaCosts.java | 16 +- .../abilities/effects/AsThoughEffect.java | 4 +- .../abilities/effects/ContinuousEffect.java | 32 ++- .../effects/CostModificationEffect.java | 4 +- Mage/src/mage/abilities/effects/Effect.java | 22 +- .../abilities/effects/ReplacementEffect.java | 4 +- .../mage/abilities/mana/builder/Builder.java | 3 +- .../src/mage/actions/score/ScoringSystem.java | 5 +- Mage/src/mage/cards/Card.java | 70 ++--- Mage/src/mage/cards/Cards.java | 26 +- Mage/src/mage/cards/decks/DeckValidator.java | 6 +- Mage/src/mage/choices/Choice.java | 20 +- Mage/src/mage/filter/Filter.java | 14 +- Mage/src/mage/filter/FilterInPlay.java | 4 +- Mage/src/mage/game/Game.java | 220 +++++++------- Mage/src/mage/game/command/CommandObject.java | 9 +- Mage/src/mage/game/draft/Draft.java | 32 +-- Mage/src/mage/game/match/Match.java | 44 +-- Mage/src/mage/game/permanent/Permanent.java | 162 +++++------ Mage/src/mage/game/stack/StackObject.java | 11 +- Mage/src/mage/game/tournament/Tournament.java | 32 +-- Mage/src/mage/players/Player.java | 272 +++++++++--------- Mage/src/mage/target/Target.java | 73 +++-- Mage/src/mage/util/Copyable.java | 2 +- Mage/src/mage/util/functions/Function.java | 2 +- Mage/src/mage/watchers/Watcher.java | 18 +- 53 files changed, 762 insertions(+), 755 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/util/Command.java b/Mage.Client/src/main/java/mage/client/util/Command.java index ce62caaa7ab..1389a86b284 100644 --- a/Mage.Client/src/main/java/mage/client/util/Command.java +++ b/Mage.Client/src/main/java/mage/client/util/Command.java @@ -4,5 +4,6 @@ package mage.client.util; * @author nantuko */ public interface Command { - public void execute(); + + void execute(); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/BoundBean.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/BoundBean.java index f22fdadbddc..1269cba48a4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/BoundBean.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/BoundBean.java @@ -17,11 +17,12 @@ import java.beans.PropertyChangeListener; * @author Clemens Koza */ public interface BoundBean { - public void addPropertyChangeListener(PropertyChangeListener listener); - public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); + void addPropertyChangeListener(PropertyChangeListener listener); - public void removePropertyChangeListener(PropertyChangeListener listener); + void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); - public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); + void removePropertyChangeListener(PropertyChangeListener listener); + + void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Properties.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Properties.java index 87d9b1fe904..084928510f2 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Properties.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Properties.java @@ -23,22 +23,23 @@ import org.mage.plugins.card.dl.beans.properties.bound.BoundProperties; * @author Clemens Koza */ public interface Properties { - public Property property(String name, Property property); - public List list(String name, List list); + Property property(String name, Property property); - public Set set(String name, Set set); + List list(String name, List list); - public Map map(String name, Map map); + Set set(String name, Set set); + + Map map(String name, Map map); - public Property property(String name, T value); + Property property(String name, T value); - public Property property(String name); + Property property(String name); - public List list(String name); + List list(String name); - public Set set(String name); + Set set(String name); - public Map map(String name); + Map map(String name); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Property.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Property.java index ffc3eb9d1ad..ce9a67bdd0f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Property.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/Property.java @@ -14,19 +14,20 @@ package org.mage.plugins.card.dl.beans.properties; * @author Clemens Koza */ public interface Property { - public void setValue(T value); - public T getValue(); + void setValue(T value); + + T getValue(); /** * A property's hash code is its value's hashCode, or {@code null} if the value is null. */ @Override - public int hashCode(); + int hashCode(); /** * Two properties are equal if their values are equal. */ @Override - public boolean equals(Object obj); + boolean equals(Object obj); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java index 13bbbe38d2b..390e2dd121a 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java @@ -3,22 +3,23 @@ package org.mage.plugins.card.utils; import java.awt.*; public interface ImageManager { - public Image getAppImage(); - public Image getAppSmallImage(); - public Image getAppFlashedImage(); - public Image getSicknessImage(); - public Image getDayImage(); - public Image getNightImage(); + Image getAppImage(); + Image getAppSmallImage(); + Image getAppFlashedImage(); - public Image getDlgAcceptButtonImage(); - public Image getDlgActiveAcceptButtonImage(); - public Image getDlgCancelButtonImage(); - public Image getDlgActiveCancelButtonImage(); - public Image getDlgPrevButtonImage(); - public Image getDlgActivePrevButtonImage(); - public Image getDlgNextButtonImage(); - public Image getDlgActiveNextButtonImage(); + Image getSicknessImage(); + Image getDayImage(); + Image getNightImage(); - public Image getPhaseImage(String phase); + Image getDlgAcceptButtonImage(); + Image getDlgActiveAcceptButtonImage(); + Image getDlgCancelButtonImage(); + Image getDlgActiveCancelButtonImage(); + Image getDlgPrevButtonImage(); + Image getDlgActivePrevButtonImage(); + Image getDlgNextButtonImage(); + Image getDlgActiveNextButtonImage(); + + Image getPhaseImage(String phase); } diff --git a/Mage.Common/src/mage/components/CardInfoPane.java b/Mage.Common/src/mage/components/CardInfoPane.java index cb569a0b32f..b4f138e2609 100644 --- a/Mage.Common/src/mage/components/CardInfoPane.java +++ b/Mage.Common/src/mage/components/CardInfoPane.java @@ -9,6 +9,7 @@ import mage.view.CardView; * @author nantuko */ public interface CardInfoPane { - public void setCard (final CardView card); - public boolean isCurrentCard (CardView card); + + void setCard (final CardView card); + boolean isCurrentCard (CardView card); } diff --git a/Mage.Common/src/mage/interfaces/Action.java b/Mage.Common/src/mage/interfaces/Action.java index d0d03218ee1..7ab3bca44ef 100644 --- a/Mage.Common/src/mage/interfaces/Action.java +++ b/Mage.Common/src/mage/interfaces/Action.java @@ -13,5 +13,5 @@ public interface Action { /** * Executes action. */ - public void execute() throws MageException; + void execute() throws MageException; } diff --git a/Mage.Common/src/mage/interfaces/ActionWithResult.java b/Mage.Common/src/mage/interfaces/ActionWithResult.java index e33bdfe2af3..2c565b249f6 100644 --- a/Mage.Common/src/mage/interfaces/ActionWithResult.java +++ b/Mage.Common/src/mage/interfaces/ActionWithResult.java @@ -16,11 +16,11 @@ public interface ActionWithResult { * Executes and returns result. * @return */ - public T execute() throws MageException; + T execute() throws MageException; /** * Defines negative result specific for type . * @return */ - public T negativeResult(); + T negativeResult(); } diff --git a/Mage.Common/src/mage/interfaces/MageClient.java b/Mage.Common/src/mage/interfaces/MageClient.java index d3659feba74..c609e9c6505 100644 --- a/Mage.Common/src/mage/interfaces/MageClient.java +++ b/Mage.Common/src/mage/interfaces/MageClient.java @@ -38,11 +38,11 @@ import mage.utils.MageVersion; */ public interface MageClient extends CallbackClient { - public UUID getId(); - public MageVersion getVersion(); - public void connected(String message); - public void disconnected(); - public void showMessage(String message); - public void showError(String message); + UUID getId(); + MageVersion getVersion(); + void connected(String message); + void disconnected(); + void showMessage(String message); + void showError(String message); } diff --git a/Mage.Common/src/mage/interfaces/callback/CallbackClient.java b/Mage.Common/src/mage/interfaces/callback/CallbackClient.java index 42a67a09e53..f3a3fa8854b 100644 --- a/Mage.Common/src/mage/interfaces/callback/CallbackClient.java +++ b/Mage.Common/src/mage/interfaces/callback/CallbackClient.java @@ -34,6 +34,5 @@ package mage.interfaces.callback; */ public interface CallbackClient { - public void processCallback(ClientCallback callback); - + void processCallback(ClientCallback callback); } diff --git a/Mage.Server/src/main/java/mage/server/Room.java b/Mage.Server/src/main/java/mage/server/Room.java index 12baaa294f8..32d6e9a5125 100644 --- a/Mage.Server/src/main/java/mage/server/Room.java +++ b/Mage.Server/src/main/java/mage/server/Room.java @@ -36,6 +36,7 @@ import java.util.UUID; * @author BetaSteward_at_googlemail.com */ public interface Room extends Remote { - public UUID getChatId(); - public UUID getRoomId(); + + UUID getChatId(); + UUID getRoomId(); } diff --git a/Mage.Server/src/main/java/mage/server/game/GameCallback.java b/Mage.Server/src/main/java/mage/server/game/GameCallback.java index 4f2c092d3be..af13a0631a1 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameCallback.java +++ b/Mage.Server/src/main/java/mage/server/game/GameCallback.java @@ -36,6 +36,5 @@ import mage.MageException; */ public interface GameCallback { - public void gameResult(String result) throws MageException; - + void gameResult(String result) throws MageException; } diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index dc3f64042e0..1729f56b725 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -638,6 +638,6 @@ public class GameController implements GameCallback { } interface Command { - public void execute(UUID player); + void execute(UUID player); } } diff --git a/Mage.Server/src/main/java/mage/server/game/GamesRoom.java b/Mage.Server/src/main/java/mage/server/game/GamesRoom.java index bf9c4811cf5..e08489c8f62 100644 --- a/Mage.Server/src/main/java/mage/server/game/GamesRoom.java +++ b/Mage.Server/src/main/java/mage/server/game/GamesRoom.java @@ -45,17 +45,17 @@ import mage.view.TableView; */ public interface GamesRoom extends Room { - public List getTables(); - public List getFinished(); - public List getPlayers(); - public boolean joinTable(UUID userId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException; - public boolean joinTournamentTable(UUID userId, UUID tableId, String name, String playerType, int skill) throws GameException; - public TableView createTable(UUID userId, MatchOptions options); - public TableView createTournamentTable(UUID userId, TournamentOptions options); - public void removeTable(UUID userId, UUID tableId); - public void removeTable(UUID tableId); - public TableView getTable(UUID tableId); - public void leaveTable(UUID userId, UUID tableId); - public boolean watchTable(UUID userId, UUID tableId) throws MageException; + List getTables(); + List getFinished(); + List getPlayers(); + boolean joinTable(UUID userId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException; + boolean joinTournamentTable(UUID userId, UUID tableId, String name, String playerType, int skill) throws GameException; + TableView createTable(UUID userId, MatchOptions options); + TableView createTournamentTable(UUID userId, TournamentOptions options); + void removeTable(UUID userId, UUID tableId); + void removeTable(UUID tableId); + TableView getTable(UUID tableId); + void leaveTable(UUID userId, UUID tableId); + boolean watchTable(UUID userId, UUID tableId) throws MageException; } diff --git a/Mage.Server/src/main/java/mage/server/services/LogKeys.java b/Mage.Server/src/main/java/mage/server/services/LogKeys.java index a45b5703c4e..4a4593f42f3 100644 --- a/Mage.Server/src/main/java/mage/server/services/LogKeys.java +++ b/Mage.Server/src/main/java/mage/server/services/LogKeys.java @@ -5,29 +5,29 @@ package mage.server.services; */ public interface LogKeys { - public static final String KEY_GAME_STARTED = "gameStarted"; + String KEY_GAME_STARTED = "gameStarted"; - public static final String KEY_USER_CONNECTED = "userConnected"; + String KEY_USER_CONNECTED = "userConnected"; - public static final String KEY_ADMIN_CONNECTED = "adminConnected"; + String KEY_ADMIN_CONNECTED = "adminConnected"; - public static final String KEY_SESSION_KILLED = "sessionKilled"; + String KEY_SESSION_KILLED = "sessionKilled"; - public static final String KEY_SESSION_DISCONNECTED = "sessionDisconnected"; + String KEY_SESSION_DISCONNECTED = "sessionDisconnected"; - public static final String KEY_SESSION_DISCONNECTED_BY_ADMIN = "sessionDisconnectedByAdmin"; + String KEY_SESSION_DISCONNECTED_BY_ADMIN = "sessionDisconnectedByAdmin"; - public static final String KEY_NOT_VALID_SESSION = "sessionNotValid"; + String KEY_NOT_VALID_SESSION = "sessionNotValid"; - public static final String KEY_NOT_VALID_SESSION_INTERNAL = "sessionNotValidInternal"; + String KEY_NOT_VALID_SESSION_INTERNAL = "sessionNotValidInternal"; - public static final String KEY_TABLE_CREATED = "tableCreated"; + String KEY_TABLE_CREATED = "tableCreated"; - public static final String KEY_TOURNAMENT_TABLE_CREATED = "tournamentTableCreated"; + String KEY_TOURNAMENT_TABLE_CREATED = "tournamentTableCreated"; - public static final String KEY_WRONG_VERSION = "wrongVersion"; + String KEY_WRONG_VERSION = "wrongVersion"; - public static final String KEY_NOT_ADMIN = "notAdminRestrictedOperation"; + String KEY_NOT_ADMIN = "notAdminRestrictedOperation"; - public static final String KEY_FEEDBACK_ADDED = "feedbackAdded"; + String KEY_FEEDBACK_ADDED = "feedbackAdded"; } diff --git a/Mage/src/mage/MageItem.java b/Mage/src/mage/MageItem.java index 4c1a9e3b968..bcbf51049c6 100644 --- a/Mage/src/mage/MageItem.java +++ b/Mage/src/mage/MageItem.java @@ -37,6 +37,5 @@ import java.util.UUID; */ public interface MageItem extends Serializable { - public UUID getId(); - + UUID getId(); } diff --git a/Mage/src/mage/MageObject.java b/Mage/src/mage/MageObject.java index f749d21d52c..50d85f6f9f2 100644 --- a/Mage/src/mage/MageObject.java +++ b/Mage/src/mage/MageObject.java @@ -12,36 +12,36 @@ import java.util.List; public interface MageObject extends MageItem, Serializable { - public String getName(); - public void setName(String name); + String getName(); + void setName(String name); - public List getCardType(); - public List getSubtype(); - public boolean hasSubtype(String subtype); - public List getSupertype(); + List getCardType(); + List getSubtype(); + boolean hasSubtype(String subtype); + List getSupertype(); - public Abilities getAbilities(); - public ObjectColor getColor(); - public ManaCosts getManaCost(); + Abilities getAbilities(); + ObjectColor getColor(); + ManaCosts getManaCost(); - public MageInt getPower(); - public MageInt getToughness(); + MageInt getPower(); + MageInt getToughness(); - public void adjustChoices(Ability ability, Game game); - public void adjustCosts(Ability ability, Game game); - public void adjustTargets(Ability ability, Game game); + void adjustChoices(Ability ability, Game game); + void adjustCosts(Ability ability, Game game); + void adjustTargets(Ability ability, Game game); - public MageObject copy(); + MageObject copy(); /** * Defines that MageObject is a copy of another object * @param isCopy */ - public void setCopy(boolean isCopy); + void setCopy(boolean isCopy); /** * Checks if current MageObject is a copy of another object * @return */ - public boolean isCopy(); + boolean isCopy(); } diff --git a/Mage/src/mage/abilities/Abilities.java b/Mage/src/mage/abilities/Abilities.java index 5ab6425b062..da8cd7ff4a4 100644 --- a/Mage/src/mage/abilities/Abilities.java +++ b/Mage/src/mage/abilities/Abilities.java @@ -59,7 +59,7 @@ public interface Abilities extends List, Serializable { * @see mage.cards.CardImpl#getRules() * @see mage.abilities.keyword.LevelAbility#getRule() */ - public List getRules(String source); + List getRules(String source); /** * Retrieves all activated abilities for the given {@link Zone}. @@ -69,7 +69,7 @@ public interface Abilities extends List, Serializable { * * @see mage.cards.CardImpl#getSpellAbility() */ - public Abilities getActivatedAbilities(Zone zone); + Abilities getActivatedAbilities(Zone zone); /** * Retrieves all {@link ManaAbility mana abilities} in the given {@link Zone}. @@ -81,7 +81,7 @@ public interface Abilities extends List, Serializable { * @see mage.players.PlayerImpl#getManaAvailable(mage.game.Game) * @see mage.players.PlayerImpl#getAvailableManaProducers(mage.game.Game) */ - public Abilities getManaAbilities(Zone zone); + Abilities getManaAbilities(Zone zone); /** * Retrieves all {@link ManaAbility mana abilities} in the given {@link Zone} that can be used. @@ -93,7 +93,7 @@ public interface Abilities extends List, Serializable { * @see mage.players.PlayerImpl#getManaAvailable(mage.game.Game) * @see mage.players.PlayerImpl#getAvailableManaProducers(mage.game.Game) */ - public Abilities getAvailableManaAbilities(Zone zone, Game game); + Abilities getAvailableManaAbilities(Zone zone, Game game); /** * Retrieves all {@link StaticAbility static abilities} in the given {@link Zone}. @@ -108,14 +108,14 @@ public interface Abilities extends List, Serializable { * @see mage.abilities.effects.ContinuousEffects#asThough(java.util.UUID, mage.Constants.AsThoughEffectType, mage.game.Game) * @see mage.abilities.effects.ContinuousEffects#costModification(mage.abilities.Ability, mage.game.Game) */ - public Abilities getStaticAbilities(Zone zone); + Abilities getStaticAbilities(Zone zone); /** * Retrieves all {@link EvasionAbility evasion abilities}. * * @return The {@link EvasionAbility evasion abilities}. */ - public Abilities getEvasionAbilities(); + Abilities getEvasionAbilities(); /** * Retrieves all {@link TriggeredAbility triggered abilities} for the given @@ -128,7 +128,7 @@ public interface Abilities extends List, Serializable { * @see mage.game.permanent.PermanentImpl#checkTriggers(mage.game.events.GameEvent, mage.game.Game) * @see mage.game.permanent.PermanentCard#checkPermanentOnlyTriggers(mage.game.events.ZoneChangeEvent, mage.game.Game) */ - public Abilities getTriggeredAbilities(Zone zone); + Abilities getTriggeredAbilities(Zone zone); /** * Retrieves all {@link ProtectionAbility protection abilities}. @@ -139,7 +139,7 @@ public interface Abilities extends List, Serializable { * @see mage.players.PlayerImpl#hasProtectionFrom(mage.MageObject) * @see mage.players.PlayerImpl#canDamage(mage.MageObject) */ - public Abilities getProtectionAbilities(); + Abilities getProtectionAbilities(); /** * TODO Method is unused, keep it around? @@ -150,7 +150,7 @@ public interface Abilities extends List, Serializable { * * @return A numeral value representing the 'strength' or effectiveness of the abilities? */ - public int getOutcomeTotal(); + int getOutcomeTotal(); /** * Sets the controller of this set of abilities. @@ -162,7 +162,7 @@ public interface Abilities extends List, Serializable { * @see mage.game.permanent.PermanentImpl#changeControllerId(java.util.UUID, mage.game.Game) * @see mage.game.permanent.PermanentCard#copyFromCard(mage.cards.Card) */ - public void setControllerId(UUID controllerId); + void setControllerId(UUID controllerId); /** * Sets the source of this set of abilities. @@ -171,17 +171,17 @@ public interface Abilities extends List, Serializable { * * @see mage.cards.CardImpl#assignNewId() */ - public void setSourceId(UUID sourceId); + void setSourceId(UUID sourceId); /** * Assigns a new {@link java.util.UUID} */ - public void newId(); + void newId(); /** * Assigns a new {@link java.util.UUID} */ - public void newOriginalId(); + void newOriginalId(); /** * Searches this set of abilities to see if the ability represented by the abilityId @@ -190,7 +190,7 @@ public interface Abilities extends List, Serializable { * @param abilityId * @return */ - public boolean containsKey(UUID abilityId); + boolean containsKey(UUID abilityId); /** * TODO Method is unused, keep it around? @@ -200,7 +200,7 @@ public interface Abilities extends List, Serializable { * @param abilityId * @return */ - public T get(UUID abilityId); + T get(UUID abilityId); /** * TODO The usage of this method seems redundant to that of {@link #containsKey(java.util.UUID)} @@ -212,7 +212,7 @@ public interface Abilities extends List, Serializable { * @param ability * @return */ - public boolean contains(T ability); + boolean contains(T ability); /** * Searches this set of abilities for the existence of each of the passed in @@ -221,7 +221,7 @@ public interface Abilities extends List, Serializable { * @param abilities * @return True if the passed in set of abilities is also in this set of abilities. */ - public boolean containsAll(Abilities abilities); + boolean containsAll(Abilities abilities); /** * Copies this set of abilities. This copy should be new instances of all @@ -229,7 +229,7 @@ public interface Abilities extends List, Serializable { * * @return */ - public Abilities copy(); + Abilities copy(); - public String getValue(); + String getValue(); } diff --git a/Mage/src/mage/abilities/Ability.java b/Mage/src/mage/abilities/Ability.java index 5e3817f547c..48e4282fad6 100644 --- a/Mage/src/mage/abilities/Ability.java +++ b/Mage/src/mage/abilities/Ability.java @@ -62,7 +62,7 @@ public interface Ability extends Controllable, Serializable { * @return A {@link java.util.UUID} which the game will use to store and retrieve * the exact instance of this ability. */ - public UUID getId(); + UUID getId(); /** * Assigns a new {@link java.util.UUID} @@ -71,7 +71,7 @@ public interface Ability extends Controllable, Serializable { * @see mage.game.GameImpl#addTriggeredAbility(mage.abilities.TriggeredAbility) * @see mage.game.GameImpl#addDelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility) */ - public void newId(); + void newId(); /** * Assigns a new {@link java.util.UUID} @@ -80,14 +80,14 @@ public interface Ability extends Controllable, Serializable { * @see mage.game.GameImpl#addTriggeredAbility(mage.abilities.TriggeredAbility) * @see mage.game.GameImpl#addDelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility) */ - public void newOriginalId(); + void newOriginalId(); /** * Gets the {@link AbilityType} of this ability. * * @return The {@link AbilityType type} of this ability. */ - public AbilityType getAbilityType(); + AbilityType getAbilityType(); /** * Gets the id of the player in control of this ability. @@ -95,35 +95,35 @@ public interface Ability extends Controllable, Serializable { * @return The {@link java.util.UUID} of the controlling player. */ @Override - public UUID getControllerId(); + UUID getControllerId(); /** * Sets the id of the controller of this ability. * * @param controllerId The {@link java.util.UUID} of the controller. */ - public void setControllerId(UUID controllerId); + void setControllerId(UUID controllerId); /** * Gets the id of the object which put this ability in motion. * * @return The {@link java.util.UUID} of the object this ability is associated with. */ - public UUID getSourceId(); + UUID getSourceId(); /** * Sets the id of the object which this ability orignates from. * * @param sourceID {@link java.util.UUID} the source id to set. */ - public void setSourceId(UUID sourceID); + void setSourceId(UUID sourceID); /** * Gets all {@link Costs} associated with this ability. * * @return All {@link Costs} associated with this ability. */ - public Costs getCosts(); + Costs getCosts(); /** * Adds a {@link Cost} to this ability that must be paid before this ability @@ -131,7 +131,7 @@ public interface Ability extends Controllable, Serializable { * * @param cost The {@link Cost} to add. */ - public void addCost(Cost cost); + void addCost(Cost cost); /** * Gets all {@link ManaCosts} associated with this ability. These returned @@ -140,7 +140,7 @@ public interface Ability extends Controllable, Serializable { * * @return All {@link ManaCosts} that must be paid. */ - public ManaCosts getManaCosts(); + ManaCosts getManaCosts(); /** * Gets all the {@link ManaCosts} that must be paid before activating this @@ -149,7 +149,7 @@ public interface Ability extends Controllable, Serializable { * * @return All {@link ManaCosts} that must be paid. */ - public ManaCosts getManaCostsToPay(); + ManaCosts getManaCostsToPay(); /** * Adds a {@link ManaCost} to this ability that must be paid before this @@ -157,14 +157,14 @@ public interface Ability extends Controllable, Serializable { * * @param cost The {@link ManaCost} to add. */ - public void addManaCost(ManaCost cost); + void addManaCost(ManaCost cost); /** * Gets all {@link AlternativeCost} associated with this ability. * * @return All {@link AlternativeCost}'s that can be paid instead of the {@link ManaCosts} */ - public List getAlternativeCosts(); + List getAlternativeCosts(); /** * Adds an {@link AlternativeCost} this ability that may be paid instead of @@ -172,7 +172,7 @@ public interface Ability extends Controllable, Serializable { * * @param cost The {@link AlternativeCost} to add. */ - public void addAlternativeCost(AlternativeCost cost); + void addAlternativeCost(AlternativeCost cost); /** * TODO Method is unused, keep it around? @@ -182,14 +182,14 @@ public interface Ability extends Controllable, Serializable { * * @return All {@link Costs} that can be paid above and beyond other costs. */ - public Costs getOptionalCosts(); + Costs getOptionalCosts(); /** * Adds a {@link Cost} that is optional to this ability. * * @param cost The {@link Cost} to add to the optional costs. */ - public void addOptionalCost(Cost cost); + void addOptionalCost(Cost cost); /** * Retrieves the effects that are put into the place by the resolution of this @@ -198,7 +198,7 @@ public interface Ability extends Controllable, Serializable { * @return All {@link Effects} that will be put into place by the resolution * of this ability. */ - public Effects getEffects(); + Effects getEffects(); /** * Retrieves the effects of the specified {@link EffectType type} that are @@ -208,14 +208,14 @@ public interface Ability extends Controllable, Serializable { * @param effectType The {@link EffectType type} to search for. * @return All {@link Effects} of the given {@link EffectType}. */ - public Effects getEffects(Game game, EffectType effectType); + Effects getEffects(Game game, EffectType effectType); /** * Adds an effect to this ability. * * @param effect The {@link Effect} to add. */ - public void addEffect(Effect effect); + void addEffect(Effect effect); /** * Retrieves all targets that must be satisfied before this ability is @@ -224,7 +224,7 @@ public interface Ability extends Controllable, Serializable { * @return All {@link Targets} that must be satisfied before this ability is put onto * the stack. */ - public Targets getTargets(); + Targets getTargets(); /** * Retrieves the {@link Target} located at the 0th index in the {@link Targets}. @@ -234,7 +234,7 @@ public interface Ability extends Controllable, Serializable { * * @see mage.target.Target */ - public UUID getFirstTarget(); + UUID getFirstTarget(); /** * Adds a target to this ability that must be satisfied before this ability @@ -242,35 +242,35 @@ public interface Ability extends Controllable, Serializable { * * @param target The {@link Target} to add. */ - public void addTarget(Target target); + void addTarget(Target target); /** * Choices * * @return */ - public Choices getChoices(); + Choices getChoices(); /** * TODO: Javadoc me * * @param choice */ - public void addChoice(Choice choice); + void addChoice(Choice choice); /** * Retrieves the {@link Zone} that this ability is active within. * * @return */ - public Zone getZone(); + Zone getZone(); /** * Retrieves whether or not this abilities activation will use the stack. * * @return */ - public boolean isUsesStack(); + boolean isUsesStack(); /** * Retrieves a human readable string representing what the ability states it @@ -279,7 +279,7 @@ public interface Ability extends Controllable, Serializable { * @return A human readable string representing what the ability states it * accomplishes */ - public String getRule(); + String getRule(); /** * Retrieves a human readable string including any costs associated with this @@ -289,7 +289,7 @@ public interface Ability extends Controllable, Serializable { * @param all True if costs are desired in the output, false otherwise. * @return */ - public String getRule(boolean all); + String getRule(boolean all); /** * Retrieves the rule associated with the given source. @@ -297,7 +297,7 @@ public interface Ability extends Controllable, Serializable { * @param source * @return */ - public String getRule(String source); + String getRule(String source); /** * Activates this ability prompting the controller to pay any mandatory @@ -311,7 +311,7 @@ public interface Ability extends Controllable, Serializable { * @see mage.players.PlayerImpl#playAbility(mage.abilities.ActivatedAbility, mage.game.Game) * @see mage.players.PlayerImpl#triggerAbility(mage.abilities.TriggeredAbility, mage.game.Game) */ - public boolean activate(Game game, boolean noMana); + boolean activate(Game game, boolean noMana); /** * Resolves this ability and puts any effects it produces into play. This @@ -324,14 +324,14 @@ public interface Ability extends Controllable, Serializable { * @see mage.players.PlayerImpl#playManaAbility(mage.abilities.mana.ManaAbility, mage.game.Game) * @see mage.players.PlayerImpl#specialAction(mage.abilities.SpecialAction, mage.game.Game) */ - public boolean resolve(Game game); + boolean resolve(Game game); /** * Used to reset the state of this ability. * * @param game */ - public void reset(Game game); + void reset(Game game); /** * Overridden by triggered abilities with intervening if clauses - rule 20110715 - 603.4 @@ -339,22 +339,22 @@ public interface Ability extends Controllable, Serializable { * @param game * @return Whether or not the intervening if clause is satisfied */ - public boolean checkIfClause(Game game); + boolean checkIfClause(Game game); /** * Creates a fresh copy of this ability. * * @return A new copy of this ability. */ - public Ability copy(); + Ability copy(); - public boolean isModal(); + boolean isModal(); - public void addMode(Mode mode); + void addMode(Mode mode); - public Modes getModes(); + Modes getModes(); - public boolean canChooseTarget(Game game); + boolean canChooseTarget(Game game); /** * Returns true if this abilities source is in the zone for the ability @@ -363,20 +363,20 @@ public interface Ability extends Controllable, Serializable { * @param checkLKI * @return */ - public boolean isInUseableZone(Game game, MageObject source, boolean checkLKI); + boolean isInUseableZone(Game game, MageObject source, boolean checkLKI); /** * Returns true if this ability has to be shown on top of the card. * * @return */ - public boolean getRuleAtTheTop(); + boolean getRuleAtTheTop(); /** * Sets the value for the ruleAtTheTop attribute * * @param ruleAtTheTop */ - public void setRuleAtTheTop(boolean ruleAtTheTop); + void setRuleAtTheTop(boolean ruleAtTheTop); } diff --git a/Mage/src/mage/abilities/ActivatedAbility.java b/Mage/src/mage/abilities/ActivatedAbility.java index 40dc49830f5..24b6773f15c 100644 --- a/Mage/src/mage/abilities/ActivatedAbility.java +++ b/Mage/src/mage/abilities/ActivatedAbility.java @@ -37,7 +37,7 @@ import mage.game.Game; */ public interface ActivatedAbility extends Ability { - public boolean canActivate(UUID playerId, Game game); - public String getActivatedMessage(Game game); + boolean canActivate(UUID playerId, Game game); + String getActivatedMessage(Game game); } diff --git a/Mage/src/mage/abilities/TriggeredAbility.java b/Mage/src/mage/abilities/TriggeredAbility.java index 9037d8e3681..654d2467ff2 100644 --- a/Mage/src/mage/abilities/TriggeredAbility.java +++ b/Mage/src/mage/abilities/TriggeredAbility.java @@ -38,10 +38,10 @@ import mage.game.events.GameEvent; */ public interface TriggeredAbility extends Ability { - public void trigger(Game game, UUID controllerId); - public boolean checkTrigger(GameEvent event, Game game); - public boolean checkInterveningIfClause(Game game); + void trigger(Game game, UUID controllerId); + boolean checkTrigger(GameEvent event, Game game); + boolean checkInterveningIfClause(Game game); @Override - public TriggeredAbility copy(); + TriggeredAbility copy(); } diff --git a/Mage/src/mage/abilities/costs/AlternativeCost.java b/Mage/src/mage/abilities/costs/AlternativeCost.java index 0f24d41fa89..c46a17a150f 100644 --- a/Mage/src/mage/abilities/costs/AlternativeCost.java +++ b/Mage/src/mage/abilities/costs/AlternativeCost.java @@ -35,7 +35,8 @@ import mage.game.Game; * @author BetaSteward_at_googlemail.com */ public interface AlternativeCost extends Cost { - public boolean isAvailable(Game game, Ability source); - public String getName(); + boolean isAvailable(Game game, Ability source); + + String getName(); } diff --git a/Mage/src/mage/abilities/costs/Cost.java b/Mage/src/mage/abilities/costs/Cost.java index c77fa80c0ec..61146cf5b9c 100644 --- a/Mage/src/mage/abilities/costs/Cost.java +++ b/Mage/src/mage/abilities/costs/Cost.java @@ -37,15 +37,15 @@ import mage.target.Targets; public interface Cost extends Serializable { - public UUID getId(); - public String getText(); - public boolean canPay(UUID sourceId, UUID controllerId, Game game); - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana); - public boolean isPaid(); - public void clearPaid(); - public void setPaid(); - public Targets getTargets(); + UUID getId(); + String getText(); + boolean canPay(UUID sourceId, UUID controllerId, Game game); + boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana); + boolean isPaid(); + void clearPaid(); + void setPaid(); + Targets getTargets(); - public Cost copy(); + Cost copy(); } diff --git a/Mage/src/mage/abilities/costs/Costs.java b/Mage/src/mage/abilities/costs/Costs.java index 9fb95226b7b..0cfd861023d 100644 --- a/Mage/src/mage/abilities/costs/Costs.java +++ b/Mage/src/mage/abilities/costs/Costs.java @@ -32,8 +32,8 @@ import java.util.List; public interface Costs extends List, Cost { - public List getUnpaid(); - public List getVariableCosts(); + List getUnpaid(); + List getVariableCosts(); @Override - public Costs copy(); + Costs copy(); } diff --git a/Mage/src/mage/abilities/costs/OptionalAdditionalCost.java b/Mage/src/mage/abilities/costs/OptionalAdditionalCost.java index f868debd79e..8f71eb898f1 100644 --- a/Mage/src/mage/abilities/costs/OptionalAdditionalCost.java +++ b/Mage/src/mage/abilities/costs/OptionalAdditionalCost.java @@ -33,7 +33,7 @@ package mage.abilities.costs; */ public interface OptionalAdditionalCost extends Cost { - public String getName(); + String getName(); /** * Returns the complete text for the addional coast or if onlyCost is true @@ -42,14 +42,14 @@ public interface OptionalAdditionalCost extends Cost { * @param onlyCost * @return */ - public String getText(boolean onlyCost); + String getText(boolean onlyCost); /** * Returns a reminder text, if the cost has one * * @return */ - public String getReminderText(); + String getReminderText(); /** * Returns a text suffix for the game log, that can be added to @@ -58,7 +58,7 @@ public interface OptionalAdditionalCost extends Cost { * @param position - if there are multiple costs, it's the postion the cost is set (starting with 0) * @return */ - public String getCastSuffixMessage(int position); + String getCastSuffixMessage(int position); /** @@ -66,38 +66,38 @@ public interface OptionalAdditionalCost extends Cost { * * @param activated */ - public void activate(); + void activate(); /** * Reset the activate and count information * */ - public void reset(); + void reset(); /** * Set if the cost be multiple times activated * */ - public void setRepeatable(boolean repeatable); + void setRepeatable(boolean repeatable); /** * Can the cost be multiple times activated * * @return */ - public boolean isRepeatable(); + boolean isRepeatable(); /** * Returns if the cost was activated * * @return */ - public boolean isActivated(); + boolean isActivated(); /** * Returns the number of times the cost was activated * @return */ - public int getActivateCount(); + int getActivateCount(); } diff --git a/Mage/src/mage/abilities/costs/VariableCost.java b/Mage/src/mage/abilities/costs/VariableCost.java index 049f4a32268..ebcf234a317 100644 --- a/Mage/src/mage/abilities/costs/VariableCost.java +++ b/Mage/src/mage/abilities/costs/VariableCost.java @@ -36,7 +36,7 @@ import mage.filter.FilterMana; */ public interface VariableCost { - public int getAmount(); - public void setAmount(int amount); - public void setFilter(FilterMana filter); + int getAmount(); + void setAmount(int amount); + void setFilter(FilterMana filter); } diff --git a/Mage/src/mage/abilities/costs/mana/ManaCost.java b/Mage/src/mage/abilities/costs/mana/ManaCost.java index 63739d94ac2..d2c10880f39 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCost.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCost.java @@ -38,20 +38,21 @@ import mage.players.ManaPool; public interface ManaCost extends Cost { - public int convertedManaCost(); - public Mana getMana(); - public Mana getPayment(); - public void assignPayment(Game game, Ability ability, ManaPool pool); - public void setPayment(Mana mana); - @Override - public String getText(); - public ManaCost getUnpaid(); - public ManaOptions getOptions(); - public boolean testPay(Mana testMana); - public Filter getSourceFilter(); - public void setSourceFilter(Filter filter); + int convertedManaCost(); + Mana getMana(); + Mana getPayment(); + void assignPayment(Game game, Ability ability, ManaPool pool); + void setPayment(Mana mana); + ManaCost getUnpaid(); + ManaOptions getOptions(); + boolean testPay(Mana testMana); + Filter getSourceFilter(); + void setSourceFilter(Filter filter); @Override - public ManaCost copy(); + String getText(); + + @Override + ManaCost copy(); } diff --git a/Mage/src/mage/abilities/costs/mana/ManaCosts.java b/Mage/src/mage/abilities/costs/mana/ManaCosts.java index d218c841789..a16c099cb4f 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCosts.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCosts.java @@ -38,17 +38,17 @@ import mage.abilities.costs.VariableCost; */ public interface ManaCosts extends List, ManaCost { - public ManaCosts getUnpaidVariableCosts(); - public List getVariableCosts(); - public int getX(); - public void setX(int x); - public void load(String mana); - public List getSymbols(); + ManaCosts getUnpaidVariableCosts(); + List getVariableCosts(); + int getX(); + void setX(int x); + void load(String mana); + List getSymbols(); @Override - public Mana getMana(); + Mana getMana(); @Override - public ManaCosts copy(); + ManaCosts copy(); } diff --git a/Mage/src/mage/abilities/effects/AsThoughEffect.java b/Mage/src/mage/abilities/effects/AsThoughEffect.java index f9e5df8676d..bc475aa0e74 100644 --- a/Mage/src/mage/abilities/effects/AsThoughEffect.java +++ b/Mage/src/mage/abilities/effects/AsThoughEffect.java @@ -39,7 +39,7 @@ import mage.game.Game; */ public interface AsThoughEffect> extends ContinuousEffect { - public boolean applies(UUID sourceId, Ability source, Game game); - public AsThoughEffectType getAsThoughEffectType(); + boolean applies(UUID sourceId, Ability source, Game game); + AsThoughEffectType getAsThoughEffectType(); } diff --git a/Mage/src/mage/abilities/effects/ContinuousEffect.java b/Mage/src/mage/abilities/effects/ContinuousEffect.java index d6c7089d094..c6d47dd5255 100644 --- a/Mage/src/mage/abilities/effects/ContinuousEffect.java +++ b/Mage/src/mage/abilities/effects/ContinuousEffect.java @@ -44,19 +44,21 @@ import java.util.UUID; */ public interface ContinuousEffect> extends Effect { - public boolean isUsed(); - public boolean isDiscarded(); - public void discard(); - public Duration getDuration(); - public Date getTimestamp(); - public void setTimestamp(); - public void newId(); - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game); - public boolean hasLayer(Layer layer); - public boolean isInactive(Ability source, Game game); - public void init(Ability source, Game game); - public Layer getLayer(); - public SubLayer getSublayer(); - public void overrideRuleText(String text); - public List getAffectedObjects(); + boolean isUsed(); + boolean isDiscarded(); + void discard(); + Duration getDuration(); + Date getTimestamp(); + void setTimestamp(); + boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game); + boolean hasLayer(Layer layer); + boolean isInactive(Ability source, Game game); + void init(Ability source, Game game); + Layer getLayer(); + SubLayer getSublayer(); + void overrideRuleText(String text); + List getAffectedObjects(); + + @Override + void newId(); } diff --git a/Mage/src/mage/abilities/effects/CostModificationEffect.java b/Mage/src/mage/abilities/effects/CostModificationEffect.java index 275f9eaf6c2..efe8a32d4a8 100644 --- a/Mage/src/mage/abilities/effects/CostModificationEffect.java +++ b/Mage/src/mage/abilities/effects/CostModificationEffect.java @@ -52,7 +52,7 @@ public interface CostModificationEffect> ext * @param abilityToModify The {@link mage.abilities.SpellAbility} or {@link Ability} which should be modified. * @return */ - public boolean apply ( Game game, Ability source, Ability abilityToModify ); + boolean apply ( Game game, Ability source, Ability abilityToModify ); /** * Called by the {@link ContinuousEffects#costModification(mage.abilities.Ability, mage.game.Game) ContinuousEffects.costModification} @@ -63,5 +63,5 @@ public interface CostModificationEffect> ext * @param game The game for which this effect shoul dbe applied. * @return */ - public boolean applies(Ability abilityToModify, Ability source, Game game); + boolean applies(Ability abilityToModify, Ability source, Game game); } diff --git a/Mage/src/mage/abilities/effects/Effect.java b/Mage/src/mage/abilities/effects/Effect.java index 1725376b26e..9dd2aeb82d8 100644 --- a/Mage/src/mage/abilities/effects/Effect.java +++ b/Mage/src/mage/abilities/effects/Effect.java @@ -43,17 +43,17 @@ import mage.target.targetpointer.TargetPointer; */ public interface Effect> extends Serializable { - public UUID getId(); - public void newId(); - public String getText(Mode mode); - public boolean apply(Game game, Ability source); - public Outcome getOutcome(); - public EffectType getEffectType(); - public void setTargetPointer(TargetPointer targetPointer); - public TargetPointer getTargetPointer(); - public void setValue(String key, Object value); - public Object getValue(String key); + UUID getId(); + void newId(); + String getText(Mode mode); + boolean apply(Game game, Ability source); + Outcome getOutcome(); + EffectType getEffectType(); + void setTargetPointer(TargetPointer targetPointer); + TargetPointer getTargetPointer(); + void setValue(String key, Object value); + Object getValue(String key); - public T copy(); + T copy(); } diff --git a/Mage/src/mage/abilities/effects/ReplacementEffect.java b/Mage/src/mage/abilities/effects/ReplacementEffect.java index aab0e264849..3e8d31985cd 100644 --- a/Mage/src/mage/abilities/effects/ReplacementEffect.java +++ b/Mage/src/mage/abilities/effects/ReplacementEffect.java @@ -38,7 +38,7 @@ import mage.game.events.GameEvent; */ public interface ReplacementEffect> extends ContinuousEffect { - public boolean replaceEvent(GameEvent event, Ability source, Game game); - public boolean applies(GameEvent event, Ability source, Game game); + boolean replaceEvent(GameEvent event, Ability source, Game game); + boolean applies(GameEvent event, Ability source, Game game); } diff --git a/Mage/src/mage/abilities/mana/builder/Builder.java b/Mage/src/mage/abilities/mana/builder/Builder.java index c07dacc6718..9cb05eeb1ee 100644 --- a/Mage/src/mage/abilities/mana/builder/Builder.java +++ b/Mage/src/mage/abilities/mana/builder/Builder.java @@ -33,5 +33,6 @@ import java.io.Serializable; * @author noxx */ public interface Builder extends Serializable { - public T build(Object... options); + + T build(Object... options); } diff --git a/Mage/src/mage/actions/score/ScoringSystem.java b/Mage/src/mage/actions/score/ScoringSystem.java index d80a387bac5..fad4e62dc9a 100644 --- a/Mage/src/mage/actions/score/ScoringSystem.java +++ b/Mage/src/mage/actions/score/ScoringSystem.java @@ -7,6 +7,7 @@ import mage.game.Game; * @author ayratn */ public interface ScoringSystem { - public int getLoseGameScore(final Game game); - public int getCardScore(final Card card); + + int getLoseGameScore(final Game game); + int getCardScore(final Card card); } diff --git a/Mage/src/mage/cards/Card.java b/Mage/src/mage/cards/Card.java index e497daeeda3..4a89c5cfc26 100644 --- a/Mage/src/mage/cards/Card.java +++ b/Mage/src/mage/cards/Card.java @@ -42,34 +42,34 @@ import mage.watchers.Watcher; public interface Card extends MageObject { - public UUID getOwnerId(); - public int getCardNumber(); - public void setCardNumber(int cid); - public Rarity getRarity(); - public void setRarity(Rarity rarity); - public void setControllerId(UUID controllerId); - public void setOwnerId(UUID ownerId); - public void addAbility(Ability ability); - public void addWatcher(Watcher watcher); - public SpellAbility getSpellAbility(); - public List getRules(); - public List getWatchers(); - public String getExpansionSetCode(); - public void setExpansionSetCode(String expansionSetCode); - public void setFaceDown(boolean value); - public boolean isFaceDown(); - public boolean isFlipCard(); + UUID getOwnerId(); + int getCardNumber(); + void setCardNumber(int cid); + Rarity getRarity(); + void setRarity(Rarity rarity); + void setControllerId(UUID controllerId); + void setOwnerId(UUID ownerId); + void addAbility(Ability ability); + void addWatcher(Watcher watcher); + SpellAbility getSpellAbility(); + List getRules(); + List getWatchers(); + String getExpansionSetCode(); + void setExpansionSetCode(String expansionSetCode); + void setFaceDown(boolean value); + boolean isFaceDown(); + boolean isFlipCard(); - public boolean canTransform(); - public Card getSecondCardFace(); - public void setSecondCardFace(Card card); - public boolean isNightCard(); + boolean canTransform(); + Card getSecondCardFace(); + void setSecondCardFace(Card card); + boolean isNightCard(); - public void assignNewId(); + void assignNewId(); - public int getZoneChangeCounter(); + int getZoneChangeCounter(); - public void addInfo(String key, String value); + void addInfo(String key, String value); /** * Moves the card to the specified zone @@ -84,9 +84,9 @@ public interface Card extends MageObject { * * @return true if card was moved to zone */ - public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag); + boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag); - public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag, ArrayList appliedEffects); + boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag, ArrayList appliedEffects); /** * Moves the card to an exile zone @@ -96,24 +96,24 @@ public interface Card extends MageObject { * @param game * @return true if card was moved to zone */ - public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game); + boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game); - public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList appliedEffects); + boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList appliedEffects); - public boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId); - public boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId); - public List getMana(); + boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId); + boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId); + List getMana(); - public void build(); + void build(); - public void setUsesVariousArt(boolean usesVariousArt); + void setUsesVariousArt(boolean usesVariousArt); /** * * @return true if there exists various art images for this card */ - public boolean getUsesVariousArt(); + boolean getUsesVariousArt(); @Override - public Card copy(); + Card copy(); } diff --git a/Mage/src/mage/cards/Cards.java b/Mage/src/mage/cards/Cards.java index fc0230ca0f7..8256e0b3946 100644 --- a/Mage/src/mage/cards/Cards.java +++ b/Mage/src/mage/cards/Cards.java @@ -38,18 +38,18 @@ import mage.game.Game; public interface Cards extends Set, Serializable { - public void add(Card card); - public Card get(UUID cardId, Game game); - public void remove(Card card); - public void setOwner(UUID ownerId, Game game); - public void addAll(List createCards); - public Set getCards(Game game); - public Set getCards(FilterCard filter, Game game); - public Collection getUniqueCards(Game game); - public Card getRandom(Game game); - public int count(FilterCard filter, Game game); - public int count(FilterCard filter, UUID playerId, Game game); - public int count(FilterCard filter, UUID sourceId, UUID playerId, Game game); + void add(Card card); + Card get(UUID cardId, Game game); + void remove(Card card); + void setOwner(UUID ownerId, Game game); + void addAll(List createCards); + Set getCards(Game game); + Set getCards(FilterCard filter, Game game); + Collection getUniqueCards(Game game); + Card getRandom(Game game); + int count(FilterCard filter, Game game); + int count(FilterCard filter, UUID playerId, Game game); + int count(FilterCard filter, UUID sourceId, UUID playerId, Game game); - public Cards copy(); + Cards copy(); } diff --git a/Mage/src/mage/cards/decks/DeckValidator.java b/Mage/src/mage/cards/decks/DeckValidator.java index f66d05f67a6..096f4847d66 100644 --- a/Mage/src/mage/cards/decks/DeckValidator.java +++ b/Mage/src/mage/cards/decks/DeckValidator.java @@ -37,8 +37,8 @@ import java.util.Map; */ public interface DeckValidator extends Serializable { - public String getName(); - public boolean validate(Deck deck); - public Map getInvalid(); + String getName(); + boolean validate(Deck deck); + Map getInvalid(); } diff --git a/Mage/src/mage/choices/Choice.java b/Mage/src/mage/choices/Choice.java index 010018f577d..55671a168d6 100644 --- a/Mage/src/mage/choices/Choice.java +++ b/Mage/src/mage/choices/Choice.java @@ -36,15 +36,15 @@ import java.util.Set; */ public interface Choice { - public boolean isChosen(); - public boolean isRequired(); - public void clearChoice(); - public String getMessage(); - public void setMessage(String message); - public void setChoice(String choice); - public Set getChoices(); - public void setChoices(Set choices); - public String getChoice(); + boolean isChosen(); + boolean isRequired(); + void clearChoice(); + String getMessage(); + void setMessage(String message); + void setChoice(String choice); + Set getChoices(); + void setChoices(Set choices); + String getChoice(); - public Choice copy(); + Choice copy(); } diff --git a/Mage/src/mage/filter/Filter.java b/Mage/src/mage/filter/Filter.java index 025222438e8..90d0c228457 100644 --- a/Mage/src/mage/filter/Filter.java +++ b/Mage/src/mage/filter/Filter.java @@ -39,7 +39,7 @@ import mage.game.Game; */ public interface Filter extends Serializable { - public enum ComparisonType { + enum ComparisonType { GreaterThan(">"), Equal("=="), @@ -57,16 +57,16 @@ public interface Filter extends Serializable { } } - public enum ComparisonScope { + enum ComparisonScope { Any, All } - public boolean match(E o, Game game); - public void add(Predicate predicate); + boolean match(E o, Game game); + void add(Predicate predicate); - public String getMessage(); - public void setMessage(String message); + String getMessage(); + void setMessage(String message); - public Filter copy(); + Filter copy(); } diff --git a/Mage/src/mage/filter/FilterInPlay.java b/Mage/src/mage/filter/FilterInPlay.java index 627b602009b..434e013dc90 100644 --- a/Mage/src/mage/filter/FilterInPlay.java +++ b/Mage/src/mage/filter/FilterInPlay.java @@ -38,8 +38,8 @@ import mage.game.Game; */ public interface FilterInPlay extends Filter { - public boolean match(E o, UUID sourceId, UUID playerId, Game game); + boolean match(E o, UUID sourceId, UUID playerId, Game game); @Override - public FilterInPlay copy(); + FilterInPlay copy(); } diff --git a/Mage/src/mage/game/Game.java b/Mage/src/mage/game/Game.java index f939d631af6..53ae6d163fa 100644 --- a/Mage/src/mage/game/Game.java +++ b/Mage/src/mage/game/Game.java @@ -68,106 +68,106 @@ import java.util.*; public interface Game extends MageItem, Serializable { - public MatchType getGameType(); - public int getNumPlayers(); - public int getLife(); - public RangeOfInfluence getRangeOfInfluence(); - public MultiplayerAttackOption getAttackOption(); + MatchType getGameType(); + int getNumPlayers(); + int getLife(); + RangeOfInfluence getRangeOfInfluence(); + MultiplayerAttackOption getAttackOption(); //game data methods - public void loadCards(Set cards, UUID ownerId); - public Collection getCards(); - public Object getCustomData(); - public void setCustomData(Object data); - public GameOptions getOptions(); - public MageObject getObject(UUID objectId); - public MageObject getEmblem(UUID objectId); - public UUID getControllerId(UUID objectId); - public Permanent getPermanent(UUID permanentId); - public Card getCard(UUID cardId); - public Ability getAbility(UUID abilityId, UUID sourceId); - public void setZone(UUID objectId, Zone zone); - public void addPlayer(Player player, Deck deck) throws GameException; - public Player getPlayer(UUID playerId); - public Players getPlayers(); - public PlayerList getPlayerList(); - public Set getOpponents(UUID playerId); - public Turn getTurn(); - public Phase getPhase(); - public Step getStep(); - public int getTurnNum(); - public boolean isMainPhase(); - public boolean canPlaySorcery(UUID playerId); - public UUID getActivePlayerId(); - public UUID getPriorityPlayerId(); - public void leave(UUID playerId); - public boolean isGameOver(); - public Battlefield getBattlefield(); - public SpellStack getStack(); - public Exile getExile(); - public Combat getCombat(); - public GameState getState(); - public String getWinner(); - public ContinuousEffects getContinuousEffects(); - public GameStates getGameStates(); - public void loadGameStates(GameStates states); - public Game copy(); - public boolean isSimulation(); - public void setSimulation(boolean simulation); - public MageObject getLastKnownInformation(UUID objectId, Zone zone); - public MageObject getShortLivingLKI(UUID objectId, Zone zone); - public void rememberLKI(UUID objectId, Zone zone, MageObject object); - public void resetLKI(); - public void resetShortLivingLKI(); - public void setLosingPlayer(Player player); - public Player getLosingPlayer(); - public void setStateCheckRequired(); - public boolean getStateCheckRequired(); - public void resetForSourceId(UUID sourceId); + void loadCards(Set cards, UUID ownerId); + Collection getCards(); + Object getCustomData(); + void setCustomData(Object data); + GameOptions getOptions(); + MageObject getObject(UUID objectId); + MageObject getEmblem(UUID objectId); + UUID getControllerId(UUID objectId); + Permanent getPermanent(UUID permanentId); + Card getCard(UUID cardId); + Ability getAbility(UUID abilityId, UUID sourceId); + void setZone(UUID objectId, Zone zone); + void addPlayer(Player player, Deck deck) throws GameException; + Player getPlayer(UUID playerId); + Players getPlayers(); + PlayerList getPlayerList(); + Set getOpponents(UUID playerId); + Turn getTurn(); + Phase getPhase(); + Step getStep(); + int getTurnNum(); + boolean isMainPhase(); + boolean canPlaySorcery(UUID playerId); + UUID getActivePlayerId(); + UUID getPriorityPlayerId(); + void leave(UUID playerId); + boolean isGameOver(); + Battlefield getBattlefield(); + SpellStack getStack(); + Exile getExile(); + Combat getCombat(); + GameState getState(); + String getWinner(); + ContinuousEffects getContinuousEffects(); + GameStates getGameStates(); + void loadGameStates(GameStates states); + Game copy(); + boolean isSimulation(); + void setSimulation(boolean simulation); + MageObject getLastKnownInformation(UUID objectId, Zone zone); + MageObject getShortLivingLKI(UUID objectId, Zone zone); + void rememberLKI(UUID objectId, Zone zone, MageObject object); + void resetLKI(); + void resetShortLivingLKI(); + void setLosingPlayer(Player player); + Player getLosingPlayer(); + void setStateCheckRequired(); + boolean getStateCheckRequired(); + void resetForSourceId(UUID sourceId); //client event methods - public void addTableEventListener(Listener listener); - public void addPlayerQueryEventListener(Listener listener); - public void fireAskPlayerEvent(UUID playerId, String message); - public void fireChooseEvent(UUID playerId, Choice choice); - public void fireSelectTargetEvent(UUID playerId, String message, Set targets, boolean required, Map options); - public void fireSelectTargetEvent(UUID playerId, String message, Cards cards, boolean required, Map options); - public void fireSelectTargetEvent(UUID playerId, String message, List abilities); - public void fireSelectTargetEvent(UUID playerId, String message, List perms, boolean required); - public void fireSelectEvent(UUID playerId, String message); - public void fireLookAtCardsEvent(UUID playerId, String message, Cards cards); - public void firePriorityEvent(UUID playerId); - public void firePlayManaEvent(UUID playerId, String message); - public void firePlayXManaEvent(UUID playerId, String message); - public void fireGetChoiceEvent(UUID playerId, String message, List choices); - public void fireGetModeEvent(UUID playerId, String message, Map modes); - public void fireGetAmountEvent(UUID playerId, String message, int min, int max); - public void fireChoosePileEvent(UUID playerId, String message, List pile1, List pile2); - public void fireInformEvent(String message); - public void fireUpdatePlayersEvent(); - public void informPlayers(String message); - public void informPlayer(Player player, String message); - public void debugMessage(String message); - public void fireErrorEvent(String message, Exception ex); + void addTableEventListener(Listener listener); + void addPlayerQueryEventListener(Listener listener); + void fireAskPlayerEvent(UUID playerId, String message); + void fireChooseEvent(UUID playerId, Choice choice); + void fireSelectTargetEvent(UUID playerId, String message, Set targets, boolean required, Map options); + void fireSelectTargetEvent(UUID playerId, String message, Cards cards, boolean required, Map options); + void fireSelectTargetEvent(UUID playerId, String message, List abilities); + void fireSelectTargetEvent(UUID playerId, String message, List perms, boolean required); + void fireSelectEvent(UUID playerId, String message); + void fireLookAtCardsEvent(UUID playerId, String message, Cards cards); + void firePriorityEvent(UUID playerId); + void firePlayManaEvent(UUID playerId, String message); + void firePlayXManaEvent(UUID playerId, String message); + void fireGetChoiceEvent(UUID playerId, String message, List choices); + void fireGetModeEvent(UUID playerId, String message, Map modes); + void fireGetAmountEvent(UUID playerId, String message, int min, int max); + void fireChoosePileEvent(UUID playerId, String message, List pile1, List pile2); + void fireInformEvent(String message); + void fireUpdatePlayersEvent(); + void informPlayers(String message); + void informPlayer(Player player, String message); + void debugMessage(String message); + void fireErrorEvent(String message, Exception ex); //game event methods - public void fireEvent(GameEvent event); - public boolean replaceEvent(GameEvent event); + void fireEvent(GameEvent event); + boolean replaceEvent(GameEvent event); //game play methods - public void start(UUID choosingPlayerId); - public void start(UUID choosingPlayerId, GameOptions options); - public void resume(); - public void pause(); - public boolean isPaused(); - public void end(); - public void mulligan(UUID playerId); - public void quit(UUID playerId); - public void concede(UUID playerId); - public void emptyManaPools(); - public void addEffect(ContinuousEffect continuousEffect, Ability source); - public void addEmblem(Emblem emblem, Ability source); - public void addPermanent(Permanent permanent); + void start(UUID choosingPlayerId); + void start(UUID choosingPlayerId, GameOptions options); + void resume(); + void pause(); + boolean isPaused(); + void end(); + void mulligan(UUID playerId); + void quit(UUID playerId); + void concede(UUID playerId); + void emptyManaPools(); + void addEffect(ContinuousEffect continuousEffect, Ability source); + void addEmblem(Emblem emblem, Ability source); + void addPermanent(Permanent permanent); /** * This version supports copying of copies of any depth. @@ -177,33 +177,33 @@ public interface Game extends MageItem, Serializable { * @param source * @param applier */ - public void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier); + void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier); - public Card copyCard(Card cardToCopy, Ability source, UUID newController); + Card copyCard(Card cardToCopy, Ability source, UUID newController); - public void addTriggeredAbility(TriggeredAbility ability); - public void addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility); - public void applyEffects(); - public boolean checkStateAndTriggered(); - public void playPriority(UUID activePlayerId, boolean resuming); - public boolean endTurn(UUID playerId); + void addTriggeredAbility(TriggeredAbility ability); + void addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility); + void applyEffects(); + boolean checkStateAndTriggered(); + void playPriority(UUID activePlayerId, boolean resuming); + boolean endTurn(UUID playerId); - public int doAction(MageAction action); + int doAction(MageAction action); //game transaction methods - public void saveState(); - public int bookmarkState(); - public void restoreState(int bookmark); - public void removeBookmark(int bookmark); + void saveState(); + int bookmarkState(); + void restoreState(int bookmark); + void removeBookmark(int bookmark); // game options - public void setGameOptions(GameOptions options); + void setGameOptions(GameOptions options); // game times - public Date getStartTime(); - public Date getEndTime(); + Date getStartTime(); + Date getEndTime(); // game cheats (for tests only) - public void cheat(UUID ownerId, Map commands); - public void cheat(UUID ownerId, List library, List hand, List battlefield, List graveyard); + void cheat(UUID ownerId, Map commands); + void cheat(UUID ownerId, List library, List hand, List battlefield, List graveyard); } diff --git a/Mage/src/mage/game/command/CommandObject.java b/Mage/src/mage/game/command/CommandObject.java index 76ded007713..b41c3f4b042 100644 --- a/Mage/src/mage/game/command/CommandObject.java +++ b/Mage/src/mage/game/command/CommandObject.java @@ -38,11 +38,10 @@ import java.util.UUID; */ public interface CommandObject extends MageObject { - public UUID getSourceId(); - public UUID getControllerId(); - public void assignNewId(); -// public void checkTriggers(GameEvent event, Game game); + UUID getSourceId(); + UUID getControllerId(); + void assignNewId(); @Override - public CommandObject copy(); + CommandObject copy(); } diff --git a/Mage/src/mage/game/draft/Draft.java b/Mage/src/mage/game/draft/Draft.java index 5188dd69e54..7937d7eccf8 100644 --- a/Mage/src/mage/game/draft/Draft.java +++ b/Mage/src/mage/game/draft/Draft.java @@ -45,22 +45,22 @@ import mage.players.Player; */ public interface Draft extends MageItem, Serializable { - public void addPlayer(Player player); - public Collection getPlayers(); - public DraftPlayer getPlayer(UUID playerId); - public List getSets(); - public int getBoosterNum(); - public int getCardNum(); - public boolean addPick(UUID playerId, UUID cardId); - public void start(); - public boolean allJoined(); - public void leave(UUID playerId); - public void autoPick(UUID playerId); + void addPlayer(Player player); + Collection getPlayers(); + DraftPlayer getPlayer(UUID playerId); + List getSets(); + int getBoosterNum(); + int getCardNum(); + boolean addPick(UUID playerId, UUID cardId); + void start(); + boolean allJoined(); + void leave(UUID playerId); + void autoPick(UUID playerId); - public void addTableEventListener(Listener listener); - public void fireUpdatePlayersEvent(); - public void fireEndDraftEvent(); - public void addPlayerQueryEventListener(Listener listener); - public void firePickCardEvent(UUID playerId); + void addTableEventListener(Listener listener); + void fireUpdatePlayersEvent(); + void fireEndDraftEvent(); + void addPlayerQueryEventListener(Listener listener); + void firePickCardEvent(UUID playerId); } diff --git a/Mage/src/mage/game/match/Match.java b/Mage/src/mage/game/match/Match.java index 26190d7dbf3..502a39f660a 100644 --- a/Mage/src/mage/game/match/Match.java +++ b/Mage/src/mage/game/match/Match.java @@ -43,29 +43,29 @@ import mage.players.Player; */ public interface Match { - public static final int SIDEBOARD_TIME = 180; + int SIDEBOARD_TIME = 180; - public UUID getId(); - public String getName(); - public boolean isMatchOver(); - public List getPlayers(); - public MatchPlayer getPlayer(UUID playerId); - public void addPlayer(Player player, Deck deck); - public void submitDeck(UUID playerId, Deck deck); - public void updateDeck(UUID playerId, Deck deck); - public void startMatch() throws GameException; - public void startGame() throws GameException; - public void sideboard(); - public void endGame(); - public Game getGame(); - public List getGames(); - public int getWinsNeeded(); - public int getNumGames(); - public boolean isDoneSideboarding(); - public UUID getChooser(); - public MatchOptions getOptions(); + UUID getId(); + String getName(); + boolean isMatchOver(); + List getPlayers(); + MatchPlayer getPlayer(UUID playerId); + void addPlayer(Player player, Deck deck); + void submitDeck(UUID playerId, Deck deck); + void updateDeck(UUID playerId, Deck deck); + void startMatch() throws GameException; + void startGame() throws GameException; + void sideboard(); + void endGame(); + Game getGame(); + List getGames(); + int getWinsNeeded(); + int getNumGames(); + boolean isDoneSideboarding(); + UUID getChooser(); + MatchOptions getOptions(); - public void addTableEventListener(Listener listener); - public void fireSideboardEvent(UUID playerId, Deck deck); + void addTableEventListener(Listener listener); + void fireSideboardEvent(UUID playerId, Deck deck); } diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/mage/game/permanent/Permanent.java index 38db08f3298..65563463fce 100644 --- a/Mage/src/mage/game/permanent/Permanent.java +++ b/Mage/src/mage/game/permanent/Permanent.java @@ -42,9 +42,9 @@ import java.util.UUID; public interface Permanent extends Card, Controllable { - public boolean isTapped(); - public boolean untap(Game game); - public boolean tap(Game game); + boolean isTapped(); + boolean untap(Game game); + boolean tap(Game game); /** * use tap(game) *

setTapped doesn't trigger TAPPED event and should be used @@ -54,39 +54,39 @@ public interface Permanent extends Card, Controllable { * @deprecated */ @Deprecated - public void setTapped(boolean tapped); - public boolean canTap(); + void setTapped(boolean tapped); + boolean canTap(); - public boolean isFlipped(); - public boolean unflip(Game game); - public boolean flip(Game game); + boolean isFlipped(); + boolean unflip(Game game); + boolean flip(Game game); - public boolean transform(Game game); - public boolean isTransformed(); - public void setTransformed(boolean value); + boolean transform(Game game); + boolean isTransformed(); + void setTransformed(boolean value); - public boolean isPhasedIn(); - public boolean phaseIn(Game game); - public boolean phaseOut(Game game); + boolean isPhasedIn(); + boolean phaseIn(Game game); + boolean phaseOut(Game game); - public boolean isFaceUp(); - public boolean turnFaceUp(Game game); - public boolean turnFaceDown(Game game); + boolean isFaceUp(); + boolean turnFaceUp(Game game); + boolean turnFaceDown(Game game); - public List getAttachments(); - public UUID getAttachedTo(); - public void attachTo(UUID permanentId, Game game); - public boolean addAttachment(UUID permanentId, Game game); - public boolean removeAttachment(UUID permanentId, Game game); + List getAttachments(); + UUID getAttachedTo(); + void attachTo(UUID permanentId, Game game); + boolean addAttachment(UUID permanentId, Game game); + boolean removeAttachment(UUID permanentId, Game game); - public boolean changeControllerId(UUID controllerId, Game game); - public boolean canBeTargetedBy(MageObject source, UUID controllerId, Game game); - public boolean hasProtectionFrom(MageObject source, Game game); - public boolean hasSummoningSickness(); - public int getDamage(); - public int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat); + boolean changeControllerId(UUID controllerId, Game game); + boolean canBeTargetedBy(MageObject source, UUID controllerId, Game game); + boolean hasProtectionFrom(MageObject source, Game game); + boolean hasSummoningSickness(); + int getDamage(); + int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat); - public int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList appliedEffects); + int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList appliedEffects); /** * used in combat only to deal damage at the same time @@ -98,65 +98,65 @@ public interface Permanent extends Card, Controllable { * @param combat * @return */ - public int markDamage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat); - public int applyDamage(Game game); + int markDamage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat); + int applyDamage(Game game); - public void removeAllDamage(Game game); - public Counters getCounters(); + void removeAllDamage(Game game); + Counters getCounters(); - public void addCounters(String name, int amount, Game game); - public void addCounters(String name, int amount, Game game, ArrayList appliedEffects); - public void addCounters(Counter counter, Game game); - public void addCounters(Counter counter, Game game, ArrayList appliedEffects); + void addCounters(String name, int amount, Game game); + void addCounters(String name, int amount, Game game, ArrayList appliedEffects); + void addCounters(Counter counter, Game game); + void addCounters(Counter counter, Game game, ArrayList appliedEffects); - public void removeCounters(String name, int amount, Game game); - public void removeCounters(Counter counter, Game game); - public void reset(Game game); - public boolean destroy(UUID sourceId, Game game, boolean noRegen); - public boolean sacrifice(UUID sourceId, Game game); - public boolean regenerate(UUID sourceId, Game game); - public void entersBattlefield(UUID sourceId, Game game); - public String getValue(); + void removeCounters(String name, int amount, Game game); + void removeCounters(Counter counter, Game game); + void reset(Game game); + boolean destroy(UUID sourceId, Game game, boolean noRegen); + boolean sacrifice(UUID sourceId, Game game); + boolean regenerate(UUID sourceId, Game game); + void entersBattlefield(UUID sourceId, Game game); + String getValue(); @Deprecated @Override - public void addAbility(Ability ability); + void addAbility(Ability ability); @Deprecated - public void addAbility(Ability ability, Game game); - public void addAbility(Ability ability, UUID sourceId, Game game); + void addAbility(Ability ability, Game game); + void addAbility(Ability ability, UUID sourceId, Game game); - public void removeAllAbilities(UUID sourceId, Game game); + void removeAllAbilities(UUID sourceId, Game game); - public void setLoyaltyUsed(boolean used); - public boolean isLoyaltyUsed(); + void setLoyaltyUsed(boolean used); + boolean isLoyaltyUsed(); - public void beginningOfTurn(Game game); - public void endOfTurn(Game game); - public void checkControlChanged(Game game); - public int getTurnsOnBattlefield(); + void beginningOfTurn(Game game); + void endOfTurn(Game game); + void checkControlChanged(Game game); + int getTurnsOnBattlefield(); - public void addPower(int power); - public void addToughness(int toughness); + void addPower(int power); + void addToughness(int toughness); - public boolean isAttacking(); - public int getBlocking(); - public void setAttacking(boolean attacking); - public void setBlocking(int blocking); - public int getMaxBlocks(); - public void setMaxBlocks(int maxBlocks); - public int getMinBlockedBy(); - public void setMinBlockedBy(int minBlockedBy); - public boolean canAttack(Game game); - public boolean canBlock(UUID attackerId, Game game); - public boolean canBlockAny(Game game); - public boolean removeFromCombat(Game game); - public boolean isDeathtouched(); + boolean isAttacking(); + int getBlocking(); + void setAttacking(boolean attacking); + void setBlocking(int blocking); + int getMaxBlocks(); + void setMaxBlocks(int maxBlocks); + int getMinBlockedBy(); + void setMinBlockedBy(int minBlockedBy); + boolean canAttack(Game game); + boolean canBlock(UUID attackerId, Game game); + boolean canBlockAny(Game game); + boolean removeFromCombat(Game game); + boolean isDeathtouched(); /** * Returns the list of sources that dealt damage this turn to this permanent * @return */ - public List getDealtDamageByThisTurn(); + List getDealtDamageByThisTurn(); /** * Imprint some other card to this one. @@ -165,7 +165,7 @@ public interface Permanent extends Card, Controllable { * @param game * @return true if card was imprinted */ - public boolean imprint(UUID imprintedCard, Game game); + boolean imprint(UUID imprintedCard, Game game); /** * Removes all imprinted cards from permanent. @@ -173,7 +173,7 @@ public interface Permanent extends Card, Controllable { * @param game * @return */ - public boolean clearImprinted(Game game); + boolean clearImprinted(Game game); /** * Get card that was imprinted on this one. @@ -181,7 +181,7 @@ public interface Permanent extends Card, Controllable { * Can be null if no card was imprinted. * @return Imprinted card UUID. */ - public List getImprinted(); + List getImprinted(); /** * Allows to connect any card to permanent. @@ -190,40 +190,40 @@ public interface Permanent extends Card, Controllable { * @param key * @param connectedCard */ - public void addConnectedCard(String key, UUID connectedCard); + void addConnectedCard(String key, UUID connectedCard); /** * Returns connected cards. * Very similar to Imprint except that it is for internal use only. * @return */ - public List getConnectedCards(String key); + List getConnectedCards(String key); /** * Clear all connected cards. */ - public void clearConnectedCards(String key); + void clearConnectedCards(String key); /** * Sets paired card. * * @param pairedCard */ - public void setPairedCard(UUID pairedCard); + void setPairedCard(UUID pairedCard); /** * Gets paired card. Can return null. * * @return */ - public UUID getPairedCard(); + UUID getPairedCard(); /** * Makes permanent paired with no other permanent. */ - public void clearPairedCard(); + void clearPairedCard(); @Override - public Permanent copy(); + Permanent copy(); } diff --git a/Mage/src/mage/game/stack/StackObject.java b/Mage/src/mage/game/stack/StackObject.java index 403d04f6fd2..4aa6b618e80 100644 --- a/Mage/src/mage/game/stack/StackObject.java +++ b/Mage/src/mage/game/stack/StackObject.java @@ -37,11 +37,10 @@ import java.util.UUID; public interface StackObject extends MageObject, Controllable { -// public Card getCard(); - public boolean resolve(Game game); - public UUID getSourceId(); - public void counter(UUID sourceId, Game game); - public Ability getStackAbility(); + boolean resolve(Game game); + UUID getSourceId(); + void counter(UUID sourceId, Game game); + Ability getStackAbility(); @Override - public StackObject copy(); + StackObject copy(); } diff --git a/Mage/src/mage/game/tournament/Tournament.java b/Mage/src/mage/game/tournament/Tournament.java index b9b36c396e0..f63522f6a26 100644 --- a/Mage/src/mage/game/tournament/Tournament.java +++ b/Mage/src/mage/game/tournament/Tournament.java @@ -44,22 +44,22 @@ import mage.players.Player; */ public interface Tournament { - public UUID getId(); - public void addPlayer(Player player, String playerType); - public TournamentPlayer getPlayer(UUID playerId); - public Collection getPlayers(); - public Collection getRounds(); - public List getSets(); - public void submitDeck(UUID playerId, Deck deck); - public void updateDeck(UUID playerId, Deck deck); - public void autoSubmit(UUID playerId, Deck deck); - public boolean allJoined(); - public boolean isDoneConstructing(); - public void leave(UUID playerId); - public void nextStep(); + UUID getId(); + void addPlayer(Player player, String playerType); + TournamentPlayer getPlayer(UUID playerId); + Collection getPlayers(); + Collection getRounds(); + List getSets(); + void submitDeck(UUID playerId, Deck deck); + void updateDeck(UUID playerId, Deck deck); + void autoSubmit(UUID playerId, Deck deck); + boolean allJoined(); + boolean isDoneConstructing(); + void leave(UUID playerId); + void nextStep(); - public void addTableEventListener(Listener listener); - public void addPlayerQueryEventListener(Listener listener); - public void fireConstructEvent(UUID playerId); + void addTableEventListener(Listener listener); + void addPlayerQueryEventListener(Listener listener); + void fireConstructEvent(UUID playerId); } diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index f7f27f8efc4..088388e916e 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -68,52 +68,52 @@ import java.util.UUID; */ public interface Player extends MageItem, Copyable { - public boolean isHuman(); - public String getName(); - public RangeOfInfluence getRange(); - public Library getLibrary(); - public Cards getSideboard(); - public Cards getGraveyard(); - public Abilities getAbilities(); - public void addAbility(Ability ability); - public Counters getCounters(); - public int getLife(); - public void setLife(int life, Game game); - public int loseLife(int amount, Game game); - public boolean isCanLoseLife(); - public void setCanLoseLife(boolean canLoseLife); - public int gainLife(int amount, Game game); - public boolean isCanGainLife(); - public void setCanGainLife(boolean canGainLife); - public boolean isLifeTotalCanChange(); - public void setCanPayLifeCost(boolean canPayLifeCost); - public boolean canPayLifeCost(); - public void setCanPaySacrificeCost(boolean canPaySacrificeCost); - public boolean canPaySacrificeCost(); - public void setLifeTotalCanChange(boolean lifeTotalCanChange); - public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable); - public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList appliedEffects); - public Cards getHand(); - public int getLandsPlayed(); - public int getLandsPerTurn(); - public void setLandsPerTurn(int landsPerTurn); - public int getMaxHandSize(); - public void setMaxHandSize(int maxHandSize); - public boolean isPassed(); - public boolean isEmptyDraw(); - public void pass(); - public void resetPassed(); - public boolean hasLost(); - public boolean hasWon(); - public boolean hasLeft(); - public ManaPool getManaPool(); - public Set getInRange(); - public boolean isTopCardRevealed(); - public void setTopCardRevealed(boolean topCardRevealed); - public UserData getUserData(); - public void setUserData(UserData userData); - public boolean canLose(Game game); - public boolean autoLoseGame(); + boolean isHuman(); + String getName(); + RangeOfInfluence getRange(); + Library getLibrary(); + Cards getSideboard(); + Cards getGraveyard(); + Abilities getAbilities(); + void addAbility(Ability ability); + Counters getCounters(); + int getLife(); + void setLife(int life, Game game); + int loseLife(int amount, Game game); + boolean isCanLoseLife(); + void setCanLoseLife(boolean canLoseLife); + int gainLife(int amount, Game game); + boolean isCanGainLife(); + void setCanGainLife(boolean canGainLife); + boolean isLifeTotalCanChange(); + void setCanPayLifeCost(boolean canPayLifeCost); + boolean canPayLifeCost(); + void setCanPaySacrificeCost(boolean canPaySacrificeCost); + boolean canPaySacrificeCost(); + void setLifeTotalCanChange(boolean lifeTotalCanChange); + int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable); + int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList appliedEffects); + Cards getHand(); + int getLandsPlayed(); + int getLandsPerTurn(); + void setLandsPerTurn(int landsPerTurn); + int getMaxHandSize(); + void setMaxHandSize(int maxHandSize); + boolean isPassed(); + boolean isEmptyDraw(); + void pass(); + void resetPassed(); + boolean hasLost(); + boolean hasWon(); + boolean hasLeft(); + ManaPool getManaPool(); + Set getInRange(); + boolean isTopCardRevealed(); + void setTopCardRevealed(boolean topCardRevealed); + UserData getUserData(); + void setUserData(UserData userData); + boolean canLose(Game game); + boolean autoLoseGame(); /** * Returns a set of players which turns under you control. @@ -121,27 +121,27 @@ public interface Player extends MageItem, Copyable { * * @return */ - public Set getPlayersUnderYourControl(); + Set getPlayersUnderYourControl(); /** * Defines player whose turn this player controls at the moment. * @param playerId */ - public void controlPlayersTurn(Game game, UUID playerId); + void controlPlayersTurn(Game game, UUID playerId); /** * Sets player {@link UUID} who controls this player's turn. * * @param playerId */ - public void setTurnControlledBy(UUID playerId); + void setTurnControlledBy(UUID playerId); - public UUID getTurnControlledBy(); + UUID getTurnControlledBy(); /** * Resets players whose turns you control at the moment. */ - public void resetOtherTurnsControlled(); + void resetOtherTurnsControlled(); /** * Returns false in case player don't control the game. @@ -150,7 +150,7 @@ public interface Player extends MageItem, Copyable { * * @return */ - public boolean isGameUnderControl(); + boolean isGameUnderControl(); /** * Returns false in case you don't control the game. @@ -159,27 +159,27 @@ public interface Player extends MageItem, Copyable { * * @param value */ - public void setGameUnderYourControl(boolean value); + void setGameUnderYourControl(boolean value); - public boolean isTestMode(); - public void setTestMode(boolean value); - public void addAction(String action); - public void setAllowBadMoves(boolean allowBadMoves); + boolean isTestMode(); + void setTestMode(boolean value); + void addAction(String action); + void setAllowBadMoves(boolean allowBadMoves); - public void init(Game game); - public void init(Game game, boolean testMode); - public void useDeck(Deck deck, Game game); - public void reset(); - public void shuffleLibrary(Game game); - public int drawCards(int num, Game game); - public boolean cast(SpellAbility ability, Game game, boolean noMana); - public boolean putInHand(Card card, Game game); - public boolean removeFromHand(Card card, Game game); - public boolean removeFromBattlefield(Permanent permanent, Game game); - public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield); - public boolean removeFromGraveyard(Card card, Game game); - public boolean removeFromLibrary(Card card, Game game); - public boolean searchLibrary(TargetCardInLibrary target, Game game); + void init(Game game); + void init(Game game, boolean testMode); + void useDeck(Deck deck, Game game); + void reset(); + void shuffleLibrary(Game game); + int drawCards(int num, Game game); + boolean cast(SpellAbility ability, Game game, boolean noMana); + boolean putInHand(Card card, Game game); + boolean removeFromHand(Card card, Game game); + boolean removeFromBattlefield(Permanent permanent, Game game); + boolean putInGraveyard(Card card, Game game, boolean fromBattlefield); + boolean removeFromGraveyard(Card card, Game game); + boolean removeFromLibrary(Card card, Game game); + boolean searchLibrary(TargetCardInLibrary target, Game game); /** * * @param target @@ -187,83 +187,83 @@ public interface Player extends MageItem, Copyable { * @param targetPlayerId player whose library will be searched * @return true if search was successful */ - public boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId); - public boolean canPlayLand(); - public boolean playLand(Card card, Game game); - public boolean activateAbility(ActivatedAbility ability, Game game); - public boolean triggerAbility(TriggeredAbility ability, Game game); - public boolean canBeTargetedBy(MageObject source, Game game); - public boolean hasProtectionFrom(MageObject source, Game game); - public boolean flipCoin(Game game); - public void discard(int amount, Ability source, Game game); - public void discardToMax(Game game); - public boolean discard(Card card, Ability source, Game game); - public void lost(Game game); - public void won(Game game); - public void leave(); - public void concede(Game game); - public void abort(); + boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId); + boolean canPlayLand(); + boolean playLand(Card card, Game game); + boolean activateAbility(ActivatedAbility ability, Game game); + boolean triggerAbility(TriggeredAbility ability, Game game); + boolean canBeTargetedBy(MageObject source, Game game); + boolean hasProtectionFrom(MageObject source, Game game); + boolean flipCoin(Game game); + void discard(int amount, Ability source, Game game); + void discardToMax(Game game); + boolean discard(Card card, Ability source, Game game); + void lost(Game game); + void won(Game game); + void leave(); + void concede(Game game); + void abort(); - public void revealCards(String name, Cards cards, Game game); - public void lookAtCards(String name, Cards cards, Game game); + void revealCards(String name, Cards cards, Game game); + void lookAtCards(String name, Cards cards, Game game); @Override - public Player copy(); - public void restore(Player player); + Player copy(); + void restore(Player player); - public void setResponseString(String responseString); - public void setResponseUUID(UUID responseUUID); - public void setResponseBoolean(Boolean responseBoolean); - public void setResponseInteger(Integer data); + void setResponseString(String responseString); + void setResponseUUID(UUID responseUUID); + void setResponseBoolean(Boolean responseBoolean); + void setResponseInteger(Integer data); - public abstract boolean priority(Game game); - public abstract boolean choose(Outcome outcome, Target target, UUID sourceId, Game game); - public abstract boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map options); - public abstract boolean choose(Outcome outcome, Cards cards, TargetCard target, Game game); - public abstract boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game); - public abstract boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game); - public abstract boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game); - public abstract boolean chooseMulligan(Game game); - public abstract boolean chooseUse(Outcome outcome, String message, Game game); - public abstract boolean choose(Outcome outcome, Choice choice, Game game); - public abstract boolean choosePile(Outcome outcome, String message, List pile1, List pile2, Game game); - public abstract boolean playMana(ManaCost unpaid, Game game); - public abstract boolean playXMana(VariableManaCost cost, ManaCosts costs, Game game); - public abstract int chooseEffect(List rEffects, Game game); - public abstract TriggeredAbility chooseTriggeredAbility(List abilities, Game game); - public abstract Mode chooseMode(Modes modes, Ability source, Game game); - public abstract void selectAttackers(Game game, UUID attackingPlayerId); - public abstract void selectBlockers(Game game, UUID defendingPlayerId); - public abstract UUID chooseAttackerOrder(List attacker, Game game); - public abstract UUID chooseBlockerOrder(List blockers, Game game); - public abstract void assignDamage(int damage, List targets, String singleTargetName, UUID sourceId, Game game); - public abstract int getAmount(int min, int max, String message, Game game); - public abstract void sideboard(Match match, Deck deck); - public abstract void construct(Tournament tournament, Deck deck); - public abstract void pickCard(List cards, Deck deck, Draft draft); + boolean priority(Game game); + boolean choose(Outcome outcome, Target target, UUID sourceId, Game game); + boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map options); + boolean choose(Outcome outcome, Cards cards, TargetCard target, Game game); + boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game); + boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game); + boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game); + boolean chooseMulligan(Game game); + boolean chooseUse(Outcome outcome, String message, Game game); + boolean choose(Outcome outcome, Choice choice, Game game); + boolean choosePile(Outcome outcome, String message, List pile1, List pile2, Game game); + boolean playMana(ManaCost unpaid, Game game); + boolean playXMana(VariableManaCost cost, ManaCosts costs, Game game); + int chooseEffect(List rEffects, Game game); + TriggeredAbility chooseTriggeredAbility(List abilities, Game game); + Mode chooseMode(Modes modes, Ability source, Game game); + void selectAttackers(Game game, UUID attackingPlayerId); + void selectBlockers(Game game, UUID defendingPlayerId); + UUID chooseAttackerOrder(List attacker, Game game); + UUID chooseBlockerOrder(List blockers, Game game); + void assignDamage(int damage, List targets, String singleTargetName, UUID sourceId, Game game); + int getAmount(int min, int max, String message, Game game); + void sideboard(Match match, Deck deck); + void construct(Tournament tournament, Deck deck); + void pickCard(List cards, Deck deck, Draft draft); - public void declareAttacker(UUID attackerId, UUID defenderId, Game game); - public void declareBlocker(UUID blockerId, UUID attackerId, Game game); - public List getAvailableAttackers(Game game); - public List getAvailableBlockers(Game game); + void declareAttacker(UUID attackerId, UUID defenderId, Game game); + void declareBlocker(UUID blockerId, UUID attackerId, Game game); + List getAvailableAttackers(Game game); + List getAvailableBlockers(Game game); - public void beginTurn(Game game); - public void endOfTurn(Game game); - public void phasing(Game game); - public void untap(Game game); + void beginTurn(Game game); + void endOfTurn(Game game); + void phasing(Game game); + void untap(Game game); - public List getPlayable(Game game, boolean hidden); - public List getPlayableOptions(Ability ability, Game game); + List getPlayable(Game game, boolean hidden); + List getPlayableOptions(Ability ability, Game game); - public void addCounters(Counter counter, Game game); - public List getAttachments(); - public boolean addAttachment(UUID permanentId, Game game); - public boolean removeAttachment(UUID permanentId, Game game); + void addCounters(Counter counter, Game game); + List getAttachments(); + boolean addAttachment(UUID permanentId, Game game); + boolean removeAttachment(UUID permanentId, Game game); /** * Signals that the player becomes active player in this turn. */ - public void becomesActivePlayer(); + void becomesActivePlayer(); - public int getTurns(); + int getTurns(); } diff --git a/Mage/src/mage/target/Target.java b/Mage/src/mage/target/Target.java index 40bb89077a7..a5a3740f921 100644 --- a/Mage/src/mage/target/Target.java +++ b/Mage/src/mage/target/Target.java @@ -45,50 +45,49 @@ import java.util.UUID; */ public interface Target extends Serializable { - public boolean isChosen(); - public boolean doneChosing(); - public void clearChosen(); - public boolean isNotTarget(); - public void setNotTarget(boolean notTarget); + boolean isChosen(); + boolean doneChosing(); + void clearChosen(); + boolean isNotTarget(); + void setNotTarget(boolean notTarget); // methods for targets - public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game); - public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game); - public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game); - public void addTarget(UUID id, Ability source, Game game); - public void addTarget(UUID id, int amount, Ability source, Game game); - public void addTarget(UUID id, Ability source, Game game, boolean skipEvent); - public void addTarget(UUID id, int amount, Ability source, Game game, boolean skipEvent); - public boolean canTarget(UUID id, Game game); - public boolean canTarget(UUID id, Ability source, Game game); - public boolean isLegal(Ability source, Game game); - public List getTargetOptions(Ability source, Game game); + boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game); + Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game); + boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game); + void addTarget(UUID id, Ability source, Game game); + void addTarget(UUID id, int amount, Ability source, Game game); + void addTarget(UUID id, Ability source, Game game, boolean skipEvent); + void addTarget(UUID id, int amount, Ability source, Game game, boolean skipEvent); + boolean canTarget(UUID id, Game game); + boolean canTarget(UUID id, Ability source, Game game); + boolean isLegal(Ability source, Game game); + List getTargetOptions(Ability source, Game game); //methods for non-targets - public boolean canChoose(UUID sourceControllerId, Game game); - public Set possibleTargets(UUID sourceControllerId, Game game); - public boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Game game); - public void add(UUID id, Game game); - public void remove(UUID targetId); - public void updateTarget(UUID targetId, Game game); + boolean canChoose(UUID sourceControllerId, Game game); + Set possibleTargets(UUID sourceControllerId, Game game); + boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Game game); + void add(UUID id, Game game); + void remove(UUID targetId); + void updateTarget(UUID targetId, Game game); - public String getMessage(); - public String getTargetName(); - public void setTargetName(String name); - public String getTargetedName(Game game); - public Zone getZone(); + String getMessage(); + String getTargetName(); + void setTargetName(String name); + String getTargetedName(Game game); + Zone getZone(); - public int getTargetAmount(UUID targetId); - public int getNumberOfTargets(); - public int getMaxNumberOfTargets(); - public List getTargets(); - public Filter getFilter(); + int getTargetAmount(UUID targetId); + int getNumberOfTargets(); + int getMaxNumberOfTargets(); + List getTargets(); + Filter getFilter(); - public boolean isRequired(); - public void setRequired(boolean required); + boolean isRequired(); + void setRequired(boolean required); -// public UUID getLastTarget(); - public UUID getFirstTarget(); + UUID getFirstTarget(); - public Target copy(); + Target copy(); } diff --git a/Mage/src/mage/util/Copyable.java b/Mage/src/mage/util/Copyable.java index eaa7bf9661f..e1d0adc1aa5 100644 --- a/Mage/src/mage/util/Copyable.java +++ b/Mage/src/mage/util/Copyable.java @@ -34,5 +34,5 @@ package mage.util; */ public interface Copyable { - public abstract T copy(); + T copy(); } diff --git a/Mage/src/mage/util/functions/Function.java b/Mage/src/mage/util/functions/Function.java index ec6886734ea..2c9c6745db2 100644 --- a/Mage/src/mage/util/functions/Function.java +++ b/Mage/src/mage/util/functions/Function.java @@ -31,5 +31,5 @@ package mage.util.functions; * @author nantuko */ public interface Function { - public X apply(Y in); + X apply(Y in); } diff --git a/Mage/src/mage/watchers/Watcher.java b/Mage/src/mage/watchers/Watcher.java index 61cb902ef0b..6fefc2d60b1 100644 --- a/Mage/src/mage/watchers/Watcher.java +++ b/Mage/src/mage/watchers/Watcher.java @@ -39,14 +39,14 @@ import mage.game.events.GameEvent; */ public interface Watcher> extends Serializable { - public UUID getControllerId(); - public void setControllerId(UUID controllerId); - public UUID getSourceId(); - public void setSourceId(UUID sourceId); - public String getKey(); - public void watch(GameEvent event, Game game); - public boolean conditionMet(); - public void reset(); + UUID getControllerId(); + void setControllerId(UUID controllerId); + UUID getSourceId(); + void setSourceId(UUID sourceId); + String getKey(); + void watch(GameEvent event, Game game); + boolean conditionMet(); + void reset(); - public abstract T copy(); + abstract T copy(); }