checkstyle

This commit is contained in:
jendave
2012-01-31 07:34:15 +00:00
parent 7a8cba51e3
commit 938712ab83

View File

@@ -1,8 +1,27 @@
/*
* 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; package forge.deck;
import forge.Card; import forge.Card;
import forge.CardList; import forge.CardList;
import forge.item.*; import forge.item.CardDb;
import forge.item.CardPrinted;
import forge.item.ItemPool;
/** /**
* TODO: Write javadoc for this type. * TODO: Write javadoc for this type.
@@ -10,9 +29,13 @@ import forge.item.*;
*/ */
public class DeckSection extends ItemPool<CardPrinted> { public class DeckSection extends ItemPool<CardPrinted> {
/**
* Instantiates a new deck section.
*/
public DeckSection() { public DeckSection() {
super(CardPrinted.class); super(CardPrinted.class);
} }
/** /**
* Clear main. * Clear main.
*/ */
@@ -21,23 +44,44 @@ public class DeckSection extends ItemPool<CardPrinted> {
} }
/**
* Sets the.
*
* @param cardNames the card names
*/
public void set(final Iterable<String> cardNames) { public void set(final Iterable<String> cardNames) {
this.clear(); this.clear();
this.addAllCards(CardDb.instance().getCards(cardNames)); this.addAllCards(CardDb.instance().getCards(cardNames));
} }
/**
* Adds the.
*
* @param card the card
*/
public void add(final Card card) { public void add(final Card card) {
this.add(CardDb.instance().getCard(card)); this.add(CardDb.instance().getCard(card));
} }
public void add(final String cardName, final String setCode) /**
{ * Adds the.
add(CardDb.instance().getCard(cardName, setCode)); *
* @param cardName the card name
* @param setCode the set code
*/
public void add(final String cardName, final String setCode) {
this.add(CardDb.instance().getCard(cardName, setCode));
} }
/**
* Adds the.
*
* @param cardList the card list
*/
public void add(final CardList cardList) { public void add(final CardList cardList) {
for(Card c : cardList) for (final Card c : cardList) {
add(c); this.add(c);
}
} }
} }