|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.deckbuilder.Deck
public class Deck
Field Summary | |
---|---|
static Deck |
currentDeck
The current instance of deck. |
Constructor Summary | |
---|---|
Deck(java.lang.String deckName)
Create a new instance of this class. |
Method Summary | |
---|---|
void |
addCard(MCardCompare card)
Add any number of cards to this deck. |
void |
addCard(java.lang.String cardName,
int amount,
java.util.Map<java.lang.String,java.lang.String> properties)
Add any number of cards to this deck. |
java.util.List<MCardCompare> |
getCards()
Return the cards of this deck. |
DeckConstraint |
getConstraint()
Return the deck constraint applied to this deck.May be null . |
java.io.FileInputStream |
getMdbStream()
Return available stream of deck. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Return a property value of this deck. |
boolean |
isValidated()
Is this deck has been validated. |
void |
removeCard(MCardCompare card)
|
void |
send(java.io.OutputStream out)
Write the cards of this deck into the given output stream. |
java.lang.String |
toString()
|
java.util.List<java.lang.String> |
validate(DeckConstraint deckConstraint)
Validate this deck. |
java.util.List<java.lang.String> |
validate(java.lang.String deckConstraint)
Validate this deck. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static Deck currentDeck
DeckCounter
.
validate(String)
Constructor Detail |
---|
public Deck(java.lang.String deckName)
deckName
- The deck name.Method Detail |
---|
public java.util.List<MCardCompare> getCards()
public java.lang.Object getProperty(java.lang.String propertyName)
propertyName
- the property name.
public void addCard(java.lang.String cardName, int amount, java.util.Map<java.lang.String,java.lang.String> properties)
cardName
- the card name.amount
- th numbe of cards to add to this deck.properties
- the optional properties attached to these cards.public void addCard(MCardCompare card)
card
- the card specification.public java.util.List<java.lang.String> validate(DeckConstraint deckConstraint) throws java.io.IOException
deckConstraint
- the deck constraint name.
java.io.IOException
- if io exception occurred.public java.util.List<java.lang.String> validate(java.lang.String deckConstraint) throws java.io.IOException
deckConstraint
- the deck constraint name.
java.io.IOException
- if io exception occurred.public java.lang.String toString()
toString
in class java.lang.Object
public DeckConstraint getConstraint()
null
.
null
.public void send(java.io.OutputStream out)
out
- the output stream where this deck will be written.public java.io.FileInputStream getMdbStream()
null
only when
validating a deck. The returned stream corresponds to the first offset of
first card.
null
only when
validating a deck.public boolean isValidated()
true
if this deck has been validated.public void removeCard(MCardCompare card)
card
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |