|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.CommandParameter
public class CommandParameter
Purely a data structure used for returning units information from parsers. It contains, to speak of, no logic. For this reason, there also no unit tests for this class.
Field Summary | |
---|---|
private float |
amount
the number of units |
private int |
charsParsed
how many chars were taken up with the number and the units? |
private int |
errorCode
if an error occured (unit = ERROR), what kind was it? |
private java.lang.String |
string
used only if parameter is a string |
private UnitType |
unit
the type of unit. |
Constructor Summary | |
---|---|
CommandParameter()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Due to its many fields |
float |
getAmount()
|
int |
getCharsParsed()
|
int |
getErrorCode()
|
java.lang.String |
getString()
|
UnitType |
getUnit()
|
int |
hashCode()
If you override equals(), then... |
void |
setAmount(float amount)
|
void |
setCharsParsed(int charsParsed)
|
void |
setErrorCode(int errorCode)
|
void |
setString(java.lang.String newString)
|
void |
setUnit(UnitType unit)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private float amount
private UnitType unit
private int errorCode
private int charsParsed
private java.lang.String string
Constructor Detail |
---|
public CommandParameter()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the command parameter to test equality against
public int hashCode()
hashCode
in class java.lang.Object
public float getAmount()
public void setAmount(float amount)
public UnitType getUnit()
public void setUnit(UnitType unit)
public int getErrorCode()
public void setErrorCode(int errorCode)
public int getCharsParsed()
public void setCharsParsed(int charsParsed)
public java.lang.String getString()
public void setString(java.lang.String newString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |