Package net.mtrop.doom.text.data
Class MapInfoData.Value
java.lang.Object
net.mtrop.doom.text.data.MapInfoData.Value
- Enclosing class:
- MapInfoData
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MapInfoData.Value
Creates a new value.static MapInfoData.Value
Creates a new value (string type).static MapInfoData.Value
Creates a new value.double
Gets this value as a double.double
Gets this value as an integer.Gets this value as a String.getToken()
getType()
boolean
Checks if this value is a numeric one.toString()
-
Method Details
-
create
Creates a new value.- Parameters:
number
- the numeric value.- Returns:
- a new value.
-
create
Creates a new value (string type).- Parameters:
token
- the token value.- Returns:
- a new value.
-
create
Creates a new value.- Parameters:
token
- the token value.identifier
- if true, this is an identifier.- Returns:
- a new value.
-
getToken
- Returns:
- this value's string token.
-
getType
- Returns:
- this value's type.
-
getStringValue
Gets this value as a String.- Returns:
- the value as a String, or null if no value.
-
isNumeric
public boolean isNumeric()Checks if this value is a numeric one.- Returns:
- true if so, false if not.
-
getDoubleValue
public double getDoubleValue()Gets this value as a double.- Returns:
- the value as a double, or NaN if no value, or not parseable as a double.
-
getIntValue
public double getIntValue()Gets this value as an integer.- Returns:
- the value as an integer, or 0 if no value, or not parseable as an integer.
-
toString
-