checkstyle

This commit is contained in:
jendave
2012-02-24 09:16:30 +00:00
parent 4daa58c3c0
commit 07fb9703a9
20 changed files with 300 additions and 205 deletions

View File

@@ -360,7 +360,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
* @param format the format * @param format the format
* @return the predicate * @return the predicate
*/ */
public final static Predicate<CardEdition> isLegalInFormat(final GameFormat format) { public static final Predicate<CardEdition> isLegalInFormat(final GameFormat format) {
return new LegalInFormat(format); return new LegalInFormat(format);
} }

View File

@@ -46,7 +46,7 @@ public final class EditionUtils {
* *
* @return the all sets * @return the all sets
*/ */
public final List<CardEdition> getAllSets() { public List<CardEdition> getAllSets() {
return this.allSets; return this.allSets;
} }

View File

@@ -1736,12 +1736,12 @@ public class AbilityFactory {
else if (defined.equals("TriggeredBlocker.blocking")) { else if (defined.equals("TriggeredBlocker.blocking")) {
final SpellAbility root = sa.getRootSpellAbility(); final SpellAbility root = sa.getRootSpellAbility();
final Object crd = root.getTriggeringObject("Blocker"); final Object crd = root.getTriggeringObject("Blocker");
if (AllZoneUtil.getCardState((Card) crd).isBlocking()) { // if (AllZoneUtil.getCardState((Card) crd).isBlocking()) {
; // ;
} // }
{ // {
c = AllZoneUtil.getCardState((Card) crd); c = AllZoneUtil.getCardState((Card) crd);
} // }
} }
else if (defined.equals("OriginalHost")) { else if (defined.equals("OriginalHost")) {

View File

@@ -61,6 +61,16 @@ public abstract class DeckBase implements IHasName, Serializable, Comparable<Dec
return false; return false;
} }
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return (this.name.hashCode() * 17) + this.name.hashCode();
}
/* (non-Javadoc) /* (non-Javadoc)
* @see forge.util.IHasName#getName() * @see forge.util.IHasName#getName()
*/ */

View File

@@ -1,17 +1,39 @@
/*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Nate
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package forge.deck.io; package forge.deck.io;
import forge.PlayerType; import forge.PlayerType;
import forge.game.GameType; import forge.game.GameType;
import forge.util.FileSection; import forge.util.FileSection;
/** /**
* TODO: Write javadoc for this type. * TODO: Write javadoc for this type.
* *
*/ */
public class DeckFileHeader { public class DeckFileHeader {
/** The Constant NAME. */
public static final String NAME = "Name"; public static final String NAME = "Name";
/** The Constant DECK_TYPE. */
public static final String DECK_TYPE = "Deck Type"; public static final String DECK_TYPE = "Deck Type";
/** The Constant COMMENT. */
public static final String COMMENT = "Comment"; public static final String COMMENT = "Comment";
private static final String PLAYER = "Player"; private static final String PLAYER = "Player";
private static final String CSTM_POOL = "Custom Pool"; private static final String CSTM_POOL = "Custom Pool";
@@ -24,38 +46,65 @@ public class DeckFileHeader {
private final String name; private final String name;
private final String comment; private final String comment;
/** /**
* TODO: Write javadoc for Constructor. * TODO: Write javadoc for Constructor.
* @param parseKvPairs *
* @param kvPairs
* the kv pairs
*/ */
public DeckFileHeader(FileSection kvPairs) { public DeckFileHeader(final FileSection kvPairs) {
name = kvPairs.get(NAME); this.name = kvPairs.get(DeckFileHeader.NAME);
comment = kvPairs.get(COMMENT); this.comment = kvPairs.get(DeckFileHeader.COMMENT);
deckType = GameType.smartValueOf(kvPairs.get(DECK_TYPE), GameType.Constructed); this.deckType = GameType.smartValueOf(kvPairs.get(DeckFileHeader.DECK_TYPE), GameType.Constructed);
customPool = kvPairs.getBoolean(CSTM_POOL); this.customPool = kvPairs.getBoolean(DeckFileHeader.CSTM_POOL);
playerType = "computer".equalsIgnoreCase(kvPairs.get(PLAYER)) || "ai".equalsIgnoreCase(kvPairs.get(PLAYER_TYPE)) ? PlayerType.COMPUTER : PlayerType.HUMAN; this.playerType = "computer".equalsIgnoreCase(kvPairs.get(DeckFileHeader.PLAYER))
|| "ai".equalsIgnoreCase(kvPairs.get(DeckFileHeader.PLAYER_TYPE)) ? PlayerType.COMPUTER
: PlayerType.HUMAN;
} }
/**
public final PlayerType getPlayerType() { * Gets the player type.
return playerType; *
} * @return the player type
public final boolean isCustomPool() { */
return customPool; public final PlayerType getPlayerType() {
} return this.playerType;
public final String getName() {
return name;
}
public final String getComment() {
return comment;
} }
/**
public final GameType getDeckType() { * Checks if is custom pool.
return deckType; *
* @return true, if is custom pool
*/
public final boolean isCustomPool() {
return this.customPool;
} }
/**
* Gets the name.
*
* @return the name
*/
public final String getName() {
return this.name;
}
/**
* Gets the comment.
*
* @return the comment
*/
public final String getComment() {
return this.comment;
}
/**
* Gets the deck type.
*
* @return the deck type
*/
public final GameType getDeckType() {
return this.deckType;
}
} }

View File

@@ -34,7 +34,7 @@ import forge.util.StorageReaderFolder;
* *
*/ */
public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implements IItemSerializer<DeckGroup> { public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implements IItemSerializer<DeckGroup> {
private final String HUMAN_DECK_FILE = "human.dck"; private final String humanDeckFile = "human.dck";
/** /**
* Instantiates a new deck group serializer. * Instantiates a new deck group serializer.
@@ -46,7 +46,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
} }
/** The Constant MAX_DRAFT_PLAYERS. */ /** The Constant MAX_DRAFT_PLAYERS. */
public final static int MAX_DRAFT_PLAYERS = 8; public static final int MAX_DRAFT_PLAYERS = 8;
/** /**
* Write draft Decks. * Write draft Decks.
@@ -57,7 +57,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
public void save(final DeckGroup unit) { public void save(final DeckGroup unit) {
final File f = this.makeFileFor(unit); final File f = this.makeFileFor(unit);
f.mkdir(); f.mkdir();
FileUtil.writeFile(new File(f, this.HUMAN_DECK_FILE), unit.getHumanDeck().save()); FileUtil.writeFile(new File(f, this.humanDeckFile), unit.getHumanDeck().save());
final List<Deck> aiDecks = unit.getAiDecks(); final List<Deck> aiDecks = unit.getAiDecks();
for (int i = 1; i <= aiDecks.size(); i++) { for (int i = 1; i <= aiDecks.size(); i++) {
FileUtil.writeFile(new File(f, "ai-" + i + ".dck"), aiDecks.get(i - 1).save()); FileUtil.writeFile(new File(f, "ai-" + i + ".dck"), aiDecks.get(i - 1).save());
@@ -70,7 +70,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
@Override @Override
protected final DeckGroup read(final File file) { protected final DeckGroup read(final File file) {
final Deck human = Deck.fromFile(new File(file, this.HUMAN_DECK_FILE)); final Deck human = Deck.fromFile(new File(file, this.humanDeckFile));
if (null == human) { if (null == human) {
return null; return null;
} }
@@ -128,7 +128,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
final boolean isVisibleFolder = dir.isDirectory() && !dir.isHidden(); final boolean isVisibleFolder = dir.isDirectory() && !dir.isHidden();
final boolean hasGoodName = StringUtils.isNotEmpty(name) && !name.startsWith("."); final boolean hasGoodName = StringUtils.isNotEmpty(name) && !name.startsWith(".");
return isVisibleFolder && hasGoodName return isVisibleFolder && hasGoodName
&& new File(dir, DeckGroupSerializer.this.HUMAN_DECK_FILE).exists(); && new File(dir, DeckGroupSerializer.this.humanDeckFile).exists();
} }
}; };
} }

View File

@@ -44,7 +44,7 @@ import forge.util.SectionUtil;
public class OldDeckParser { public class OldDeckParser {
/** Constant <code>BDKFileFilter</code>. */ /** Constant <code>BDKFileFilter</code>. */
public final static FilenameFilter bdkFileFilter = new FilenameFilter() { public static final FilenameFilter BDK_FILE_FILTER = new FilenameFilter() {
@Override @Override
public boolean accept(final File dir, final String name) { public boolean accept(final File dir, final String name) {
return name.endsWith(".bdk"); return name.endsWith(".bdk");
@@ -129,7 +129,7 @@ public class OldDeckParser {
} }
private void convertDrafts() { private void convertDrafts() {
for (final File f : this.deckDir.listFiles(OldDeckParser.bdkFileFilter)) { for (final File f : this.deckDir.listFiles(OldDeckParser.BDK_FILE_FILTER)) {
boolean gotError = false; boolean gotError = false;
final Deck human = Deck.fromFile(new File(f, "0.dck")); final Deck human = Deck.fromFile(new File(f, "0.dck"));
final DeckGroup d = new DeckGroup(human.getName()); final DeckGroup d = new DeckGroup(human.getName());
@@ -244,6 +244,8 @@ public class OldDeckParser {
sealedDecks.put(name, stored); sealedDecks.put(name, stored);
} }
break; break;
default:
break;
} }
} }

View File

@@ -51,9 +51,11 @@ public final class MenuCommon extends MenuBase<Deck> {
/** /**
* Menu for Deck Editor. * Menu for Deck Editor.
* *
* @param ctrl the ctrl * @param ctrl
* @param exit a Command * the ctrl
* @param exit
* a Command
*/ */
public MenuCommon(final IDeckController<Deck> ctrl, final Command exit) { public MenuCommon(final IDeckController<Deck> ctrl, final Command exit) {
super(ctrl, exit); super(ctrl, exit);
@@ -63,7 +65,7 @@ public final class MenuCommon extends MenuBase<Deck> {
} }
private final void newRandomConstructed() { private void newRandomConstructed() {
if (!this.canLeaveCurrentDeck()) { if (!this.canLeaveCurrentDeck()) {
return; return;
} }
@@ -85,7 +87,7 @@ public final class MenuCommon extends MenuBase<Deck> {
this.getController().setModel(randomDeck); this.getController().setModel(randomDeck);
} }
private final void newGenerateConstructed() { private void newGenerateConstructed() {
if (!this.canLeaveCurrentDeck()) { if (!this.canLeaveCurrentDeck()) {
return; return;
} }
@@ -129,7 +131,7 @@ public final class MenuCommon extends MenuBase<Deck> {
* exportDeck. * exportDeck.
* </p> * </p>
*/ */
private final void exportDeck() { private void exportDeck() {
final File filename = this.getExportFilename(); final File filename = this.getExportFilename();
if (filename == null) { if (filename == null) {
return; return;
@@ -143,7 +145,7 @@ public final class MenuCommon extends MenuBase<Deck> {
} }
} }
private final File getExportFilename() { private File getExportFilename() {
final JFileChooser save = new JFileChooser(MenuCommon.previousDirectory); final JFileChooser save = new JFileChooser(MenuCommon.previousDirectory);
save.setDialogTitle("Export Deck Filename"); save.setDialogTitle("Export Deck Filename");
save.setDialogType(JFileChooser.SAVE_DIALOG); save.setDialogType(JFileChooser.SAVE_DIALOG);
@@ -165,7 +167,7 @@ public final class MenuCommon extends MenuBase<Deck> {
* Generate Proxy for a Deck. * Generate Proxy for a Deck.
* </p> * </p>
*/ */
private final void generateProxies() { private void generateProxies() {
final File filename = this.getProxiesFilename(); final File filename = this.getProxiesFilename();
if (filename == null) { if (filename == null) {
return; return;
@@ -179,7 +181,7 @@ public final class MenuCommon extends MenuBase<Deck> {
} }
} }
private final File getProxiesFilename() { private File getProxiesFilename() {
final JFileChooser save = new JFileChooser(MenuCommon.previousDirectory); final JFileChooser save = new JFileChooser(MenuCommon.previousDirectory);
save.setDialogTitle("Proxy HTML Filename"); save.setDialogTitle("Proxy HTML Filename");
save.setDialogType(JFileChooser.SAVE_DIALOG); save.setDialogType(JFileChooser.SAVE_DIALOG);
@@ -198,7 +200,9 @@ public final class MenuCommon extends MenuBase<Deck> {
// deck.setName(currentDeckName); // deck.setName(currentDeckName);
/* (non-Javadoc) /*
* (non-Javadoc)
*
* @see forge.gui.deckeditor.MenuBase#getDefaultFileMenu() * @see forge.gui.deckeditor.MenuBase#getDefaultFileMenu()
*/ */
@Override @Override

View File

@@ -58,9 +58,11 @@ public class MenuQuest extends MenuBase<Deck> {
* <p> * <p>
* Constructor for Gui_Quest_DeckEditor_Menu. * Constructor for Gui_Quest_DeckEditor_Menu.
* </p> * </p>
* *
* @param d a {@link forge.gui.deckeditor.IDeckDisplay} object. * @param d
* @param exit a {@link forge.Command} object. * a {@link forge.gui.deckeditor.IDeckDisplay} object.
* @param exit
* a {@link forge.Command} object.
*/ */
public MenuQuest(final IDeckController<Deck> d, final Command exit) { public MenuQuest(final IDeckController<Deck> d, final Command exit) {
@@ -74,7 +76,7 @@ public class MenuQuest extends MenuBase<Deck> {
* importDeck. * importDeck.
* </p> * </p>
*/ */
private final void importDeck() { private void importDeck() {
final File file = this.getImportFilename(); final File file = this.getImportFilename();
if ((file != null) && file.getName().endsWith(".dck")) { if ((file != null) && file.getName().endsWith(".dck")) {
@@ -97,7 +99,7 @@ public class MenuQuest extends MenuBase<Deck> {
* *
* @return a {@link java.io.File} object. * @return a {@link java.io.File} object.
*/ */
private final File getImportFilename() { private File getImportFilename() {
final JFileChooser chooser = new JFileChooser(MenuQuest.previousDirectory); final JFileChooser chooser = new JFileChooser(MenuQuest.previousDirectory);
chooser.addChoosableFileFilter(DeckSerializer.DCK_FILTER); chooser.addChoosableFileFilter(DeckSerializer.DCK_FILTER);
@@ -134,7 +136,9 @@ public class MenuQuest extends MenuBase<Deck> {
} }
}; };
/* (non-Javadoc) /*
* (non-Javadoc)
*
* @see forge.gui.deckeditor.MenuBase#getDefaultFileMenu() * @see forge.gui.deckeditor.MenuBase#getDefaultFileMenu()
*/ */
@Override @Override
@@ -168,7 +172,7 @@ public class MenuQuest extends MenuBase<Deck> {
* @param isHumanMenu * @param isHumanMenu
* a boolean. * a boolean.
*/ */
private final void addImportExport(final JMenu menu, final boolean isHumanMenu) { private void addImportExport(final JMenu menu, final boolean isHumanMenu) {
final JMenuItem import2 = new JMenuItem("Import"); final JMenuItem import2 = new JMenuItem("Import");
final JMenuItem export = new JMenuItem("Export"); final JMenuItem export = new JMenuItem("Export");
@@ -191,7 +195,7 @@ public class MenuQuest extends MenuBase<Deck> {
} // addImportExport() } // addImportExport()
private final void exportDeck() { private void exportDeck() {
final File filename = this.getExportFilename(); final File filename = this.getExportFilename();
if (filename == null) { if (filename == null) {
return; return;
@@ -205,7 +209,7 @@ public class MenuQuest extends MenuBase<Deck> {
} }
} }
private final File getExportFilename() { private File getExportFilename() {
final JFileChooser save = new JFileChooser(MenuQuest.previousDirectory); final JFileChooser save = new JFileChooser(MenuQuest.previousDirectory);
save.setDialogTitle("Export Deck Filename"); save.setDialogTitle("Export Deck Filename");
save.setDialogType(JFileChooser.SAVE_DIALOG); save.setDialogType(JFileChooser.SAVE_DIALOG);

View File

@@ -420,7 +420,7 @@ public final class TableModel<T extends InventoryItem> extends AbstractTableMode
/* (non-Javadoc) /* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/ */
TableSorterCascade<InventoryItem> sorter = TableModel.this.sortOrders.getSorter(); private TableSorterCascade<InventoryItem> sorter = TableModel.this.sortOrders.getSorter();
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public int compare(Entry<T, Integer> o1, Entry<T, Integer> o2) { public int compare(Entry<T, Integer> o1, Entry<T, Integer> o2) {

View File

@@ -40,6 +40,8 @@ import forge.item.ItemPoolView;
/** /**
* TableWithCards. * TableWithCards.
* *
* @param <T>
* the generic type
*/ */
public final class TableView<T extends InventoryItem> { public final class TableView<T extends InventoryItem> {
@@ -101,20 +103,20 @@ public final class TableView<T extends InventoryItem> {
} }
/** /**
*
* TableWithCards. * TableWithCards.
* *
* @param title * @param title
* a String * a String
* @param showStats * @param showStats
* a boolean * a boolean
* @param cls
* the cls
*/ */
public TableView(final String title, final boolean showStats, Class<T> cls) { public TableView(final String title, final boolean showStats, final Class<T> cls) {
this(title, showStats, false, cls); this(title, showStats, false, cls);
} }
/** /**
*
* TableWithCards Constructor. * TableWithCards Constructor.
* *
* @param title * @param title
@@ -123,10 +125,12 @@ public final class TableView<T extends InventoryItem> {
* a boolean * a boolean
* @param forceUnique * @param forceUnique
* a boolean * a boolean
* @param cls
* the cls
*/ */
public TableView(final String title, final boolean showStats, final boolean forceUnique, Class<T> cls) { public TableView(final String title, final boolean showStats, final boolean forceUnique, final Class<T> cls) {
// components // components
genericType = cls; this.genericType = cls;
final Color gray = new Color(148, 145, 140); final Color gray = new Color(148, 145, 140);
final TitledBorder titledBorder = new TitledBorder(BorderFactory.createEtchedBorder(Color.white, gray), title); final TitledBorder titledBorder = new TitledBorder(BorderFactory.createEtchedBorder(Color.white, gray), title);
@@ -154,7 +158,7 @@ public final class TableView<T extends InventoryItem> {
* a CardPanelBase * a CardPanelBase
*/ */
public void setup(final List<TableColumnInfo<InventoryItem>> columns, final CardPanelBase cardView) { public void setup(final List<TableColumnInfo<InventoryItem>> columns, final CardPanelBase cardView) {
this.model = new TableModel<T>(cardView, columns, genericType); this.model = new TableModel<T>(cardView, columns, this.genericType);
this.model.addListeners(this.table); this.model.addListeners(this.table);
this.table.setModel(this.model); this.table.setModel(this.model);
this.model.resizeCols(this.table); this.model.resizeCols(this.table);
@@ -180,9 +184,10 @@ public final class TableView<T extends InventoryItem> {
// This should not be here, but still found no better place // This should not be here, but still found no better place
/** /**
*
* getStats. * getStats.
* *
* @param <T>
* the generic type
* @param deck * @param deck
* an ItemPoolView<InventoryITem> * an ItemPoolView<InventoryITem>
* @return String * @return String
@@ -259,7 +264,7 @@ public final class TableView<T extends InventoryItem> {
* an Iterable<InventoryITem> * an Iterable<InventoryITem>
*/ */
public void setDeck(final Iterable<InventoryItem> cards) { public void setDeck(final Iterable<InventoryItem> cards) {
this.setDeckImpl(ItemPool.createFrom(cards, genericType)); this.setDeckImpl(ItemPool.createFrom(cards, this.genericType));
} }
/** /**
@@ -269,9 +274,15 @@ public final class TableView<T extends InventoryItem> {
* an ItemPoolView * an ItemPoolView
*/ */
public void setDeck(final ItemPoolView<T> poolView) { public void setDeck(final ItemPoolView<T> poolView) {
this.setDeckImpl(ItemPool.createFrom(poolView, genericType)); this.setDeckImpl(ItemPool.createFrom(poolView, this.genericType));
} }
/**
* Sets the deck.
*
* @param pool
* the new deck
*/
public void setDeck(final ItemPool<T> pool) { public void setDeck(final ItemPool<T> pool) {
this.setDeckImpl(pool); this.setDeckImpl(pool);
} }

View File

@@ -62,7 +62,7 @@ import forge.view.toolbox.FSkin;
* this class must be either private or public static final. * this class must be either private or public static final.
*/ */
public enum FModel { public enum FModel {
/** The SINGLETO n_ instance. */ /** The SINGLETO n_ instance. */
SINGLETON_INSTANCE; SINGLETON_INSTANCE;
// private static final int NUM_INIT_PHASES = 1; // private static final int NUM_INIT_PHASES = 1;

View File

@@ -47,148 +47,157 @@ public class QuestPreferences implements Serializable {
* the current preferences from the text file. * the current preferences from the text file.
*/ */
public enum QPref { public enum QPref {
/** The BOOSTE r_ commons. */ /** The BOOSTE r_ commons. */
BOOSTER_COMMONS("11"), BOOSTER_COMMONS("11"),
/** The BOOSTE r_ uncommons. */ /** The BOOSTE r_ uncommons. */
BOOSTER_UNCOMMONS("3"), BOOSTER_UNCOMMONS("3"),
/** The BOOSTE r_ rares. */ /** The BOOSTE r_ rares. */
BOOSTER_RARES("1"), BOOSTER_RARES("1"),
/** The BOOSTE r_ format. */ /** The BOOSTE r_ format. */
BOOSTER_FORMAT("Standard"), BOOSTER_FORMAT("Standard"),
/** The PENALT y_ loss. */ /** The PENALT y_ loss. */
PENALTY_LOSS("15"), /** The CURREN t_ quest. */ PENALTY_LOSS("15"), /** The CURREN t_ quest. */
CURRENT_QUEST("DEFAULT"), CURRENT_QUEST("DEFAULT"),
/** The CURREN t_ deck. */ /** The CURREN t_ deck. */
CURRENT_DECK("DEFAULT"), CURRENT_DECK("DEFAULT"),
/** The REWARD s_ base. */ /** The REWARD s_ base. */
REWARDS_BASE("25"), /** The REWARD s_ undefeated. */ REWARDS_BASE("25"), /** The REWARD s_ undefeated. */
REWARDS_UNDEFEATED("25"), REWARDS_UNDEFEATED("25"),
/** The REWARD s_ win s_ multiplier. */ /** The REWARD s_ win s_ multiplier. */
REWARDS_WINS_MULTIPLIER("0.3"), REWARDS_WINS_MULTIPLIER("0.3"),
/** The REWARD s_ poison. */ /** The REWARD s_ poison. */
REWARDS_POISON("50"), REWARDS_POISON("50"),
/** The REWARD s_ milled. */ /** The REWARD s_ milled. */
REWARDS_MILLED("40"), REWARDS_MILLED("40"),
/** The REWARD s_ mulliga n0. */ /** The REWARD s_ mulliga n0. */
REWARDS_MULLIGAN0("500"), REWARDS_MULLIGAN0("500"),
/** The REWARD s_ alternative. */ /** The REWARD s_ alternative. */
REWARDS_ALTERNATIVE("100"), REWARDS_ALTERNATIVE("100"),
/** The REWARD s_ tur n15. */ /** The REWARD s_ tur n15. */
REWARDS_TURN15("5"), REWARDS_TURN15("5"),
/** The REWARD s_ tur n10. */ /** The REWARD s_ tur n10. */
REWARDS_TURN10("50"), REWARDS_TURN10("50"),
/** The REWARD s_ tur n5. */ /** The REWARD s_ tur n5. */
REWARDS_TURN5("250"), REWARDS_TURN5("250"),
/** The REWARD s_ tur n1. */ /** The REWARD s_ tur n1. */
REWARDS_TURN1("1500"), REWARDS_TURN1("1500"),
/** The STARTIN g_ basi c_ lands. */ /** The STARTIN g_ basi c_ lands. */
STARTING_BASIC_LANDS("20"), /** The STARTIN g_ sno w_ lands. */ STARTING_BASIC_LANDS("20"), /** The STARTIN g_ sno w_ lands. */
STARTING_SNOW_LANDS("5"), STARTING_SNOW_LANDS("5"),
/** The STARTIN g_ commons. */ /** The STARTIN g_ commons. */
STARTING_COMMONS("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ common s_ easy. */ STARTING_COMMONS("DIFFICULTY_INDEX_REQD"), /**
STARTING_COMMONS_EASY("82"), * The STARTIN g_ common s_
/** The STARTIN g_ common s_ medium. */ * easy.
STARTING_COMMONS_MEDIUM("80"), */
/** The STARTIN g_ common s_ hard. */ STARTING_COMMONS_EASY("82"),
STARTING_COMMONS_HARD("78"), /** The STARTIN g_ common s_ medium. */
/** The STARTIN g_ common s_ expert. */ STARTING_COMMONS_MEDIUM("80"),
STARTING_COMMONS_EXPERT("76"), /** The STARTIN g_ common s_ hard. */
/** The STARTIN g_ uncommons. */ STARTING_COMMONS_HARD("78"),
/** The STARTIN g_ common s_ expert. */
STARTING_COMMONS_EXPERT("76"),
/** The STARTIN g_ uncommons. */
STARTING_UNCOMMONS("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ uncommon s_ easy. */ STARTING_UNCOMMONS("DIFFICULTY_INDEX_REQD"), /**
STARTING_UNCOMMONS_EASY("40"), * The STARTIN g_ uncommon
/** The STARTIN g_ uncommon s_ medium. */ * s_ easy.
STARTING_UNCOMMONS_MEDIUM("36"), */
/** The STARTIN g_ uncommon s_ hard. */ STARTING_UNCOMMONS_EASY("40"),
STARTING_UNCOMMONS_HARD("32"), /** The STARTIN g_ uncommon s_ medium. */
/** The STARTIN g_ uncommon s_ expert. */ STARTING_UNCOMMONS_MEDIUM("36"),
STARTING_UNCOMMONS_EXPERT("28"), /** The STARTIN g_ uncommon s_ hard. */
/** The STARTIN g_ rares. */ STARTING_UNCOMMONS_HARD("32"),
/** The STARTIN g_ uncommon s_ expert. */
STARTING_UNCOMMONS_EXPERT("28"),
/** The STARTIN g_ rares. */
STARTING_RARES("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ rare s_ easy. */ STARTING_RARES("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ rare s_ easy. */
STARTING_RARES_EASY("20"), STARTING_RARES_EASY("20"),
/** The STARTIN g_ rare s_ medium. */ /** The STARTIN g_ rare s_ medium. */
STARTING_RARES_MEDIUM("18"), STARTING_RARES_MEDIUM("18"),
/** The STARTIN g_ rare s_ hard. */ /** The STARTIN g_ rare s_ hard. */
STARTING_RARES_HARD("16"), STARTING_RARES_HARD("16"),
/** The STARTIN g_ rare s_ expert. */ /** The STARTIN g_ rare s_ expert. */
STARTING_RARES_EXPERT("15"), STARTING_RARES_EXPERT("15"),
/** The STARTIN g_ credits. */ /** The STARTIN g_ credits. */
STARTING_CREDITS("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ credit s_ easy. */ STARTING_CREDITS("DIFFICULTY_INDEX_REQD"), /**
STARTING_CREDITS_EASY("250"), * The STARTIN g_ credit s_
/** The STARTIN g_ credit s_ medium. */ * easy.
STARTING_CREDITS_MEDIUM("200"), */
/** The STARTIN g_ credit s_ hard. */ STARTING_CREDITS_EASY("250"),
STARTING_CREDITS_HARD("150"), /** The STARTIN g_ credit s_ medium. */
/** The STARTIN g_ credit s_ expert. */ STARTING_CREDITS_MEDIUM("200"),
STARTING_CREDITS_EXPERT("100"), /** The STARTIN g_ credit s_ hard. */
/** The WIN s_ booster. */ STARTING_CREDITS_HARD("150"),
/** The STARTIN g_ credit s_ expert. */
STARTING_CREDITS_EXPERT("100"),
/** The WIN s_ booster. */
WINS_BOOSTER("DIFFICULTY_INDEX_REQD"), /** The WIN s_ booste r_ easy. */ WINS_BOOSTER("DIFFICULTY_INDEX_REQD"), /** The WIN s_ booste r_ easy. */
WINS_BOOSTER_EASY("1"), WINS_BOOSTER_EASY("1"),
/** The WIN s_ booste r_ medium. */ /** The WIN s_ booste r_ medium. */
WINS_BOOSTER_MEDIUM("1"), WINS_BOOSTER_MEDIUM("1"),
/** The WIN s_ booste r_ hard. */ /** The WIN s_ booste r_ hard. */
WINS_BOOSTER_HARD("2"), WINS_BOOSTER_HARD("2"),
/** The WIN s_ booste r_ expert. */ /** The WIN s_ booste r_ expert. */
WINS_BOOSTER_EXPERT("2"), WINS_BOOSTER_EXPERT("2"),
/** The WIN s_ rankup. */ /** The WIN s_ rankup. */
WINS_RANKUP("DIFFICULTY_INDEX_REQD"), /** The WIN s_ ranku p_ easy. */ WINS_RANKUP("DIFFICULTY_INDEX_REQD"), /** The WIN s_ ranku p_ easy. */
WINS_RANKUP_EASY("3"), WINS_RANKUP_EASY("3"),
/** The WIN s_ ranku p_ medium. */ /** The WIN s_ ranku p_ medium. */
WINS_RANKUP_MEDIUM("4"), WINS_RANKUP_MEDIUM("4"),
/** The WIN s_ ranku p_ hard. */ /** The WIN s_ ranku p_ hard. */
WINS_RANKUP_HARD("5"), WINS_RANKUP_HARD("5"),
/** The WIN s_ ranku p_ expert. */ /** The WIN s_ ranku p_ expert. */
WINS_RANKUP_EXPERT("6"), WINS_RANKUP_EXPERT("6"),
/** The WIN s_ mediumai. */ /** The WIN s_ mediumai. */
WINS_MEDIUMAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ mediuma i_ easy. */ WINS_MEDIUMAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ mediuma i_ easy. */
WINS_MEDIUMAI_EASY("10"), WINS_MEDIUMAI_EASY("10"),
/** The WIN s_ mediuma i_ medium. */ /** The WIN s_ mediuma i_ medium. */
WINS_MEDIUMAI_MEDIUM("9"), WINS_MEDIUMAI_MEDIUM("9"),
/** The WIN s_ mediuma i_ hard. */ /** The WIN s_ mediuma i_ hard. */
WINS_MEDIUMAI_HARD("8"), WINS_MEDIUMAI_HARD("8"),
/** The WIN s_ mediuma i_ expert. */ /** The WIN s_ mediuma i_ expert. */
WINS_MEDIUMAI_EXPERT("7"), WINS_MEDIUMAI_EXPERT("7"),
/** The WIN s_ hardai. */ /** The WIN s_ hardai. */
WINS_HARDAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ harda i_ easy. */ WINS_HARDAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ harda i_ easy. */
WINS_HARDAI_EASY("20"), WINS_HARDAI_EASY("20"),
/** The WIN s_ harda i_ medium. */ /** The WIN s_ harda i_ medium. */
WINS_HARDAI_MEDIUM("18"), WINS_HARDAI_MEDIUM("18"),
/** The WIN s_ harda i_ hard. */ /** The WIN s_ harda i_ hard. */
WINS_HARDAI_HARD("16"), WINS_HARDAI_HARD("16"),
/** The WIN s_ harda i_ expert. */ /** The WIN s_ harda i_ expert. */
WINS_HARDAI_EXPERT("14"), WINS_HARDAI_EXPERT("14"),
/** The WIN s_ expertai. */ /** The WIN s_ expertai. */
WINS_EXPERTAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ experta i_ easy. */ WINS_EXPERTAI("DIFFICULTY_INDEX_REQD"), /** The WIN s_ experta i_ easy. */
WINS_EXPERTAI_EASY("40"), WINS_EXPERTAI_EASY("40"),
/** The WIN s_ experta i_ medium. */ /** The WIN s_ experta i_ medium. */
WINS_EXPERTAI_MEDIUM("36"), WINS_EXPERTAI_MEDIUM("36"),
/** The WIN s_ experta i_ hard. */ /** The WIN s_ experta i_ hard. */
WINS_EXPERTAI_HARD("32"), WINS_EXPERTAI_HARD("32"),
/** The WIN s_ experta i_ expert. */ /** The WIN s_ experta i_ expert. */
WINS_EXPERTAI_EXPERT("28"), WINS_EXPERTAI_EXPERT("28"),
/** The SHO p_ ma x_ packs. */ /** The SHO p_ ma x_ packs. */
SHOP_MAX_PACKS("6"), /** The SHO p_ single s_ common. */ SHOP_MAX_PACKS("6"), /** The SHO p_ single s_ common. */
SHOP_SINGLES_COMMON("7"), SHOP_SINGLES_COMMON("7"),
/** The SHO p_ single s_ uncommon. */ /** The SHO p_ single s_ uncommon. */
SHOP_SINGLES_UNCOMMON("3"), SHOP_SINGLES_UNCOMMON("3"),
/** The SHO p_ single s_ rare. */ /** The SHO p_ single s_ rare. */
SHOP_SINGLES_RARE("1"), SHOP_SINGLES_RARE("1"),
/** The SHO p_ win s_ fo r_ additiona l_ pack. */ /** The SHO p_ win s_ fo r_ additiona l_ pack. */
SHOP_WINS_FOR_ADDITIONAL_PACK("10"), SHOP_WINS_FOR_ADDITIONAL_PACK("10"),
/** The SHO p_ startin g_ packs. */ /** The SHO p_ startin g_ packs. */
SHOP_STARTING_PACKS("4"); SHOP_STARTING_PACKS("4");
/** */ /** */
@@ -196,8 +205,9 @@ public class QuestPreferences implements Serializable {
/** /**
* Instantiates a new q pref. * Instantiates a new q pref.
* *
* @param s0 &emsp; {@link java.lang.String} * @param s0
* &emsp; {@link java.lang.String}
*/ */
QPref(final String s0) { QPref(final String s0) {
this.strDefaultVal = s0; this.strDefaultVal = s0;
@@ -205,7 +215,7 @@ public class QuestPreferences implements Serializable {
/** /**
* Gets the default. * Gets the default.
* *
* @return {@link java.lang.String} * @return {@link java.lang.String}
*/ */
public String getDefault() { public String getDefault() {
@@ -286,9 +296,11 @@ public class QuestPreferences implements Serializable {
/** /**
* Sets the preference. * Sets the preference.
* *
* @param q0 &emsp; {@link forge.quest.data.QuestPreferences.QPref} * @param q0
* @param s0 &emsp; {@link java.lang.String} value * &emsp; {@link forge.quest.data.QuestPreferences.QPref}
* @param s0
* &emsp; {@link java.lang.String} value
*/ */
public void setPreference(final QPref q0, final String s0) { public void setPreference(final QPref q0, final String s0) {
this.preferenceValues.put(q0, s0); this.preferenceValues.put(q0, s0);
@@ -396,8 +408,9 @@ public class QuestPreferences implements Serializable {
/** /**
* Gets the difficulty. * Gets the difficulty.
* *
* @param i &emsp; int * @param i
* &emsp; int
* @return String * @return String
*/ */
public static String getDifficulty(final int i) { public static String getDifficulty(final int i) {

View File

@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
public class FileSection { public class FileSection {
/** The lines. */ /** The lines. */
protected final Map<String, String> lines = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER); private final Map<String, String> lines = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
/** /**
* Gets the lines. * Gets the lines.

View File

@@ -32,7 +32,7 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param deck * @param deck
* a {@link forge.deck.Deck} object. * a {@link forge.deck.Deck} object.
*/ */
public abstract void add(final T deck); void add(final T deck);
/** /**
* <p> * <p>
@@ -42,7 +42,7 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param deckName * @param deckName
* a {@link java.lang.String} object. * a {@link java.lang.String} object.
*/ */
public abstract void delete(final String deckName); void delete(final String deckName);
/** /**
* <p> * <p>
@@ -52,6 +52,6 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param name the name * @param name the name
* @return a boolean. * @return a boolean.
*/ */
public abstract boolean isUnique(final String name); boolean isUnique(final String name);
} }

View File

@@ -34,13 +34,13 @@ public interface IFolderMapView<T extends IHasName> extends Iterable<T> {
* @param name the name * @param name the name
* @return a {@link forge.deck.Deck} object. * @return a {@link forge.deck.Deck} object.
*/ */
public abstract T get(final String name); T get(final String name);
/** /**
* Get names of decks. * Get names of decks.
* *
* @return a ArrayList<String> * @return a ArrayList<String>
*/ */
public abstract Collection<String> getNames(); Collection<String> getNames();
} }

View File

@@ -22,7 +22,7 @@ package forge.util;
* *
*/ */
public interface IHasName { public interface IHasName {
/** /**
* Gets the name. * Gets the name.
* *

View File

@@ -25,7 +25,7 @@ import java.util.Map;
* @param <T> the generic type * @param <T> the generic type
*/ */
public interface IItemReader<T extends IHasName> { public interface IItemReader<T extends IHasName> {
/** /**
* Read all. * Read all.
* *

View File

@@ -23,7 +23,7 @@ package forge.util;
* @param <T> the generic type * @param <T> the generic type
*/ */
public interface IItemSerializer<T extends IHasName> extends IItemReader<T> { public interface IItemSerializer<T extends IHasName> extends IItemReader<T> {
/** /**
* Save. * Save.
* *

View File

@@ -446,6 +446,8 @@ public class DeckLister extends JPanel {
dEditor.getController().load(d0.getName()); dEditor.getController().load(d0.getName());
dEditor.setVisible(true); dEditor.setVisible(true);
break; break;
default:
break;
} }
} }