|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.commands.QuantityParser
This class takes an object description and checks to see if a quantity was specified. If so, it sets various flags.
Constructor Summary | |
QuantityParser(java.lang.String desc)
Constructs a new QuantityParser |
|
QuantityParser(java.lang.String[] desc)
Constructs a new QuantityParser |
Method Summary | |
boolean |
foundQuantity()
Returns true if a quantity was specified. |
java.lang.String |
getName()
Returns the name of the object with the quantity specified stripped from the front. |
int |
getQuantity()
Returns the quantity found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QuantityParser(java.lang.String desc)
public QuantityParser(java.lang.String[] desc)
desc
- the object description, broken into a String array.
If the first String in the array can be parsed by Integer.parseInt,
we'll set the foundQuantity() flag.Method Detail |
public boolean foundQuantity()
public int getQuantity()
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |