|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.properties.TavernMenu
Encapsulates a menu from which players can order food and drink.
Nested Class Summary | |
class |
TavernMenu.MenuItem
Encapsulates a single menu entry. |
Field Summary | |
static int |
DRINK
|
protected java.util.LinkedList |
entries_
|
static int |
FOOD
|
Constructor Summary | |
TavernMenu()
|
Method Summary | |
void |
barf(java.lang.String type,
java.lang.String name)
Throws a semi-descriptive parse error. |
java.util.List |
getEntries()
Returns a list of MenuItem objects comprising this menu. |
protected void |
parseElement(org.w3c.dom.Element node)
Parses an XML element from the externalized menu. |
void |
readData(org.w3c.dom.Node bean)
Tells the object to parse its externalized representation from a list of lines. |
boolean |
shouldWrite()
Returns true if we should write the object at all. |
java.util.List |
writeData()
Tells the object to write its properties out to a text file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.LinkedList entries_
public static final int DRINK
public static final int FOOD
Constructor Detail |
public TavernMenu()
Method Detail |
public java.util.List getEntries()
public void readData(org.w3c.dom.Node bean) throws java.lang.Exception
readData
in interface SelfExternalizable
bean
- the XML DOM representation of the externalized bean.
java.lang.Exception
protected void parseElement(org.w3c.dom.Element node) throws java.lang.Exception
node
- the element
java.lang.Exception
public void barf(java.lang.String type, java.lang.String name)
public java.util.List writeData() throws java.lang.Exception
writeData
in interface SelfExternalizable
java.lang.Exception
public boolean shouldWrite()
shouldWrite
in interface SelfExternalizable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |