|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaron.flightgear.FlightGearParser
public abstract class FlightGearParser
The FlightGearParser
is an abstract class that must be implemented
by a subclass.
Constructor Summary | |
---|---|
FlightGearParser()
|
Method Summary | |
---|---|
double |
getDouble(java.lang.String key)
Returns a double value that is parsed from the FlightGear output. |
java.lang.String |
getString(java.lang.String key)
Returns a String value that is parsed from the FlightGear output. |
java.lang.Boolean |
hasData()
Returns true if the parser has some data available. |
abstract java.lang.Boolean |
parse(java.lang.String data)
Parses the data which is received via the FlightGear generic i/o interface. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlightGearParser()
Method Detail |
---|
public abstract java.lang.Boolean parse(java.lang.String data)
data
- the data received from FlightGear
true
if the parsing was successfulpublic double getDouble(java.lang.String key)
double
value that is parsed from the FlightGear output.
If the value could not be found or converted then 0 is returned.
key
- a reference to the FlightGear data
double
value referenced by the key
public java.lang.String getString(java.lang.String key)
String
value that is parsed from the FlightGear output.
If the value could not be found an empty string is returned.
key
- a reference to the FlightGear data
double
value referenced by the key
public java.lang.Boolean hasData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |