|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplatypus.UnitValue
public class UnitValue
Parses part of a command to determine the number of units and the type of units specified.
| Field Summary | |
|---|---|
(package private) int |
length
|
(package private) int |
type
|
(package private) float |
value
|
| Constructor Summary | |
|---|---|
UnitValue(java.lang.String inputStr)
Parses a string for the number of units and their type (e.g. |
|
| Method Summary | |
|---|---|
void |
convertUnitsToPoints()
converts type and value to points |
int |
FTO_getUnitType(java.lang.String text,
int location)
FTO prefix = for testing only. |
int |
getLength()
|
int |
getType()
|
private int |
getUnitType(java.lang.String s,
int i)
Figures out whether s[i..i+1] is a unit of measure |
float |
getValue()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
float value
int type
int length
| Constructor Detail |
|---|
public UnitValue(java.lang.String inputStr)
inputStr - the string to parse, consiting of the value digits and optionally the type,
optionally followed by a closing ]| Method Detail |
|---|
private int getUnitType(java.lang.String s,
int i)
s - string containing the possible unit of measurei - where the unit of measure is expected in s.
public void convertUnitsToPoints()
public int getType()
public float getValue()
public int getLength()
public int FTO_getUnitType(java.lang.String text,
int location)
text - see getUnitType()location - see getUnitType()
|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||