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
* @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);
}

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,20 @@
/*
* 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;
import forge.PlayerType;
@@ -10,8 +27,13 @@ import forge.util.FileSection;
*/
public class DeckFileHeader {
/** The Constant NAME. */
public static final String NAME = "Name";
/** The Constant DECK_TYPE. */
public static final String DECK_TYPE = "Deck Type";
/** The Constant COMMENT. */
public static final String COMMENT = "Comment";
private static final String PLAYER = "Player";
private static final String CSTM_POOL = "Custom Pool";
@@ -24,38 +46,65 @@ public class DeckFileHeader {
private final String name;
private final String comment;
/**
* TODO: Write javadoc for Constructor.
* @param parseKvPairs
*
* @param kvPairs
* the kv pairs
*/
public DeckFileHeader(FileSection kvPairs) {
name = kvPairs.get(NAME);
comment = kvPairs.get(COMMENT);
deckType = GameType.smartValueOf(kvPairs.get(DECK_TYPE), GameType.Constructed);
customPool = kvPairs.getBoolean(CSTM_POOL);
playerType = "computer".equalsIgnoreCase(kvPairs.get(PLAYER)) || "ai".equalsIgnoreCase(kvPairs.get(PLAYER_TYPE)) ? PlayerType.COMPUTER : PlayerType.HUMAN;
public DeckFileHeader(final FileSection kvPairs) {
this.name = kvPairs.get(DeckFileHeader.NAME);
this.comment = kvPairs.get(DeckFileHeader.COMMENT);
this.deckType = GameType.smartValueOf(kvPairs.get(DeckFileHeader.DECK_TYPE), GameType.Constructed);
this.customPool = kvPairs.getBoolean(DeckFileHeader.CSTM_POOL);
this.playerType = "computer".equalsIgnoreCase(kvPairs.get(DeckFileHeader.PLAYER))
|| "ai".equalsIgnoreCase(kvPairs.get(DeckFileHeader.PLAYER_TYPE)) ? PlayerType.COMPUTER
: PlayerType.HUMAN;
}
public final PlayerType getPlayerType() {
return playerType;
}
public final boolean isCustomPool() {
return customPool;
}
public final String getName() {
return name;
}
public final String getComment() {
return comment;
/**
* Gets the player type.
*
* @return the player type
*/
public final PlayerType getPlayerType() {
return this.playerType;
}
public final GameType getDeckType() {
return deckType;
/**
* Checks if is custom pool.
*
* @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> {
private final String HUMAN_DECK_FILE = "human.dck";
private final String humanDeckFile = "human.dck";
/**
* Instantiates a new deck group serializer.
@@ -46,7 +46,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
}
/** The Constant MAX_DRAFT_PLAYERS. */
public final static int MAX_DRAFT_PLAYERS = 8;
public static final int MAX_DRAFT_PLAYERS = 8;
/**
* Write draft Decks.
@@ -57,7 +57,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
public void save(final DeckGroup unit) {
final File f = this.makeFileFor(unit);
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();
for (int i = 1; i <= aiDecks.size(); i++) {
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
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) {
return null;
}
@@ -128,7 +128,7 @@ public class DeckGroupSerializer extends StorageReaderFolder<DeckGroup> implemen
final boolean isVisibleFolder = dir.isDirectory() && !dir.isHidden();
final boolean hasGoodName = StringUtils.isNotEmpty(name) && !name.startsWith(".");
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 {
/** Constant <code>BDKFileFilter</code>. */
public final static FilenameFilter bdkFileFilter = new FilenameFilter() {
public static final FilenameFilter BDK_FILE_FILTER = new FilenameFilter() {
@Override
public boolean accept(final File dir, final String name) {
return name.endsWith(".bdk");
@@ -129,7 +129,7 @@ public class OldDeckParser {
}
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;
final Deck human = Deck.fromFile(new File(f, "0.dck"));
final DeckGroup d = new DeckGroup(human.getName());
@@ -244,6 +244,8 @@ public class OldDeckParser {
sealedDecks.put(name, stored);
}
break;
default:
break;
}
}

View File

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

View File

@@ -59,8 +59,10 @@ public class MenuQuest extends MenuBase<Deck> {
* Constructor for Gui_Quest_DeckEditor_Menu.
* </p>
*
* @param d a {@link forge.gui.deckeditor.IDeckDisplay} object.
* @param exit a {@link forge.Command} object.
* @param d
* a {@link forge.gui.deckeditor.IDeckDisplay} object.
* @param exit
* a {@link forge.Command} object.
*/
public MenuQuest(final IDeckController<Deck> d, final Command exit) {
@@ -74,7 +76,7 @@ public class MenuQuest extends MenuBase<Deck> {
* importDeck.
* </p>
*/
private final void importDeck() {
private void importDeck() {
final File file = this.getImportFilename();
if ((file != null) && file.getName().endsWith(".dck")) {
@@ -97,7 +99,7 @@ public class MenuQuest extends MenuBase<Deck> {
*
* @return a {@link java.io.File} object.
*/
private final File getImportFilename() {
private File getImportFilename() {
final JFileChooser chooser = new JFileChooser(MenuQuest.previousDirectory);
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()
*/
@Override
@@ -168,7 +172,7 @@ public class MenuQuest extends MenuBase<Deck> {
* @param isHumanMenu
* 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 export = new JMenuItem("Export");
@@ -191,7 +195,7 @@ public class MenuQuest extends MenuBase<Deck> {
} // addImportExport()
private final void exportDeck() {
private void exportDeck() {
final File filename = this.getExportFilename();
if (filename == null) {
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);
save.setDialogTitle("Export Deck Filename");
save.setDialogType(JFileChooser.SAVE_DIALOG);

View File

@@ -420,7 +420,7 @@ public final class TableModel<T extends InventoryItem> extends AbstractTableMode
/* (non-Javadoc)
* @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")
@Override
public int compare(Entry<T, Integer> o1, Entry<T, Integer> o2) {

View File

@@ -40,6 +40,8 @@ import forge.item.ItemPoolView;
/**
* TableWithCards.
*
* @param <T>
* the generic type
*/
public final class TableView<T extends InventoryItem> {
@@ -101,20 +103,20 @@ public final class TableView<T extends InventoryItem> {
}
/**
*
* TableWithCards.
*
* @param title
* a String
* @param showStats
* 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);
}
/**
*
* TableWithCards Constructor.
*
* @param title
@@ -123,10 +125,12 @@ public final class TableView<T extends InventoryItem> {
* a boolean
* @param forceUnique
* 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
genericType = cls;
this.genericType = cls;
final Color gray = new Color(148, 145, 140);
final TitledBorder titledBorder = new TitledBorder(BorderFactory.createEtchedBorder(Color.white, gray), title);
@@ -154,7 +158,7 @@ public final class TableView<T extends InventoryItem> {
* a CardPanelBase
*/
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.table.setModel(this.model);
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
/**
*
* getStats.
*
* @param <T>
* the generic type
* @param deck
* an ItemPoolView<InventoryITem>
* @return String
@@ -259,7 +264,7 @@ public final class TableView<T extends InventoryItem> {
* an Iterable<InventoryITem>
*/
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
*/
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) {
this.setDeckImpl(pool);
}

View File

@@ -50,145 +50,154 @@ public class QuestPreferences implements Serializable {
/** The BOOSTE r_ commons. */
BOOSTER_COMMONS("11"),
/** The BOOSTE r_ uncommons. */
/** The BOOSTE r_ uncommons. */
BOOSTER_UNCOMMONS("3"),
/** The BOOSTE r_ rares. */
/** The BOOSTE r_ rares. */
BOOSTER_RARES("1"),
/** The BOOSTE r_ format. */
/** The BOOSTE r_ format. */
BOOSTER_FORMAT("Standard"),
/** The PENALT y_ loss. */
/** The PENALT y_ loss. */
PENALTY_LOSS("15"), /** The CURREN t_ quest. */
CURRENT_QUEST("DEFAULT"),
/** The CURREN t_ deck. */
/** The CURREN t_ deck. */
CURRENT_DECK("DEFAULT"),
/** The REWARD s_ base. */
/** The REWARD s_ base. */
REWARDS_BASE("25"), /** The REWARD s_ undefeated. */
REWARDS_UNDEFEATED("25"),
/** The REWARD s_ win s_ multiplier. */
/** The REWARD s_ win s_ multiplier. */
REWARDS_WINS_MULTIPLIER("0.3"),
/** The REWARD s_ poison. */
/** The REWARD s_ poison. */
REWARDS_POISON("50"),
/** The REWARD s_ milled. */
/** The REWARD s_ milled. */
REWARDS_MILLED("40"),
/** The REWARD s_ mulliga n0. */
/** The REWARD s_ mulliga n0. */
REWARDS_MULLIGAN0("500"),
/** The REWARD s_ alternative. */
/** The REWARD s_ alternative. */
REWARDS_ALTERNATIVE("100"),
/** The REWARD s_ tur n15. */
/** The REWARD s_ tur n15. */
REWARDS_TURN15("5"),
/** The REWARD s_ tur n10. */
/** The REWARD s_ tur n10. */
REWARDS_TURN10("50"),
/** The REWARD s_ tur n5. */
/** The REWARD s_ tur n5. */
REWARDS_TURN5("250"),
/** The REWARD s_ tur n1. */
/** The REWARD s_ tur n1. */
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_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"), /**
* The STARTIN g_ common s_
* easy.
*/
STARTING_COMMONS_EASY("82"),
/** The STARTIN g_ common s_ medium. */
/** The STARTIN g_ common s_ medium. */
STARTING_COMMONS_MEDIUM("80"),
/** The STARTIN g_ common s_ hard. */
/** The STARTIN g_ common s_ hard. */
STARTING_COMMONS_HARD("78"),
/** The STARTIN g_ common s_ expert. */
/** The STARTIN g_ common s_ expert. */
STARTING_COMMONS_EXPERT("76"),
/** The STARTIN g_ uncommons. */
/** The STARTIN g_ uncommons. */
STARTING_UNCOMMONS("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ uncommon s_ easy. */
STARTING_UNCOMMONS("DIFFICULTY_INDEX_REQD"), /**
* The STARTIN g_ uncommon
* s_ easy.
*/
STARTING_UNCOMMONS_EASY("40"),
/** The STARTIN g_ uncommon s_ medium. */
/** The STARTIN g_ uncommon s_ medium. */
STARTING_UNCOMMONS_MEDIUM("36"),
/** The STARTIN g_ uncommon s_ hard. */
/** The STARTIN g_ uncommon s_ hard. */
STARTING_UNCOMMONS_HARD("32"),
/** The STARTIN g_ uncommon s_ expert. */
/** The STARTIN g_ uncommon s_ expert. */
STARTING_UNCOMMONS_EXPERT("28"),
/** The STARTIN g_ rares. */
/** The STARTIN g_ rares. */
STARTING_RARES("DIFFICULTY_INDEX_REQD"), /** The STARTIN g_ rare s_ easy. */
STARTING_RARES_EASY("20"),
/** The STARTIN g_ rare s_ medium. */
/** The STARTIN g_ rare s_ medium. */
STARTING_RARES_MEDIUM("18"),
/** The STARTIN g_ rare s_ hard. */
/** The STARTIN g_ rare s_ hard. */
STARTING_RARES_HARD("16"),
/** The STARTIN g_ rare s_ expert. */
/** The STARTIN g_ rare s_ expert. */
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"), /**
* The STARTIN g_ credit s_
* easy.
*/
STARTING_CREDITS_EASY("250"),
/** The STARTIN g_ credit s_ medium. */
/** The STARTIN g_ credit s_ medium. */
STARTING_CREDITS_MEDIUM("200"),
/** The STARTIN g_ credit s_ hard. */
/** The STARTIN g_ credit s_ hard. */
STARTING_CREDITS_HARD("150"),
/** The STARTIN g_ credit s_ expert. */
/** The STARTIN g_ credit s_ expert. */
STARTING_CREDITS_EXPERT("100"),
/** The WIN s_ booster. */
/** The WIN s_ booster. */
WINS_BOOSTER("DIFFICULTY_INDEX_REQD"), /** The WIN s_ booste r_ easy. */
WINS_BOOSTER_EASY("1"),
/** The WIN s_ booste r_ medium. */
/** The WIN s_ booste r_ medium. */
WINS_BOOSTER_MEDIUM("1"),
/** The WIN s_ booste r_ hard. */
/** The WIN s_ booste r_ hard. */
WINS_BOOSTER_HARD("2"),
/** The WIN s_ booste r_ expert. */
/** The WIN s_ booste r_ expert. */
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_EASY("3"),
/** The WIN s_ ranku p_ medium. */
/** The WIN s_ ranku p_ medium. */
WINS_RANKUP_MEDIUM("4"),
/** The WIN s_ ranku p_ hard. */
/** The WIN s_ ranku p_ hard. */
WINS_RANKUP_HARD("5"),
/** The WIN s_ ranku p_ expert. */
/** The WIN s_ ranku p_ expert. */
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_EASY("10"),
/** The WIN s_ mediuma i_ medium. */
/** The WIN s_ mediuma i_ medium. */
WINS_MEDIUMAI_MEDIUM("9"),
/** The WIN s_ mediuma i_ hard. */
/** The WIN s_ mediuma i_ hard. */
WINS_MEDIUMAI_HARD("8"),
/** The WIN s_ mediuma i_ expert. */
/** The WIN s_ mediuma i_ expert. */
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_EASY("20"),
/** The WIN s_ harda i_ medium. */
/** The WIN s_ harda i_ medium. */
WINS_HARDAI_MEDIUM("18"),
/** The WIN s_ harda i_ hard. */
/** The WIN s_ harda i_ hard. */
WINS_HARDAI_HARD("16"),
/** The WIN s_ harda i_ expert. */
/** The WIN s_ harda i_ expert. */
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_EASY("40"),
/** The WIN s_ experta i_ medium. */
/** The WIN s_ experta i_ medium. */
WINS_EXPERTAI_MEDIUM("36"),
/** The WIN s_ experta i_ hard. */
/** The WIN s_ experta i_ hard. */
WINS_EXPERTAI_HARD("32"),
/** The WIN s_ experta i_ expert. */
/** The WIN s_ experta i_ expert. */
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_SINGLES_COMMON("7"),
/** The SHO p_ single s_ uncommon. */
/** The SHO p_ single s_ uncommon. */
SHOP_SINGLES_UNCOMMON("3"),
/** The SHO p_ single s_ rare. */
/** The SHO p_ single s_ rare. */
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"),
/** The SHO p_ startin g_ packs. */
/** The SHO p_ startin g_ packs. */
SHOP_STARTING_PACKS("4");
/** */
@@ -197,7 +206,8 @@ public class QuestPreferences implements Serializable {
/**
* Instantiates a new q pref.
*
* @param s0 &emsp; {@link java.lang.String}
* @param s0
* &emsp; {@link java.lang.String}
*/
QPref(final String s0) {
this.strDefaultVal = s0;
@@ -287,8 +297,10 @@ public class QuestPreferences implements Serializable {
/**
* Sets the preference.
*
* @param q0 &emsp; {@link forge.quest.data.QuestPreferences.QPref}
* @param s0 &emsp; {@link java.lang.String} value
* @param q0
* &emsp; {@link forge.quest.data.QuestPreferences.QPref}
* @param s0
* &emsp; {@link java.lang.String} value
*/
public void setPreference(final QPref q0, final String s0) {
this.preferenceValues.put(q0, s0);
@@ -397,7 +409,8 @@ public class QuestPreferences implements Serializable {
/**
* Gets the difficulty.
*
* @param i &emsp; int
* @param i
* &emsp; int
* @return String
*/
public static String getDifficulty(final int i) {

View File

@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
public class FileSection {
/** 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.

View File

@@ -32,7 +32,7 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param deck
* a {@link forge.deck.Deck} object.
*/
public abstract void add(final T deck);
void add(final T deck);
/**
* <p>
@@ -42,7 +42,7 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param deckName
* a {@link java.lang.String} object.
*/
public abstract void delete(final String deckName);
void delete(final String deckName);
/**
* <p>
@@ -52,6 +52,6 @@ public interface IFolderMap<T extends IHasName> extends IFolderMapView<T> {
* @param name the name
* @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
* @return a {@link forge.deck.Deck} object.
*/
public abstract T get(final String name);
T get(final String name);
/**
* Get names of decks.
*
* @return a ArrayList<String>
*/
public abstract Collection<String> getNames();
Collection<String> getNames();
}

View File

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