Class MapInfoData.Value

java.lang.Object
net.mtrop.doom.text.data.MapInfoData.Value
Enclosing class:
MapInfoData

public static class MapInfoData.Value extends Object
  • Method Details

    • create

      public static MapInfoData.Value create(Number number)
      Creates a new value.
      Parameters:
      number - the numeric value.
      Returns:
      a new value.
    • create

      public static MapInfoData.Value create(String token)
      Creates a new value (string type).
      Parameters:
      token - the token value.
      Returns:
      a new value.
    • create

      public static MapInfoData.Value create(String token, boolean identifier)
      Creates a new value.
      Parameters:
      token - the token value.
      identifier - if true, this is an identifier.
      Returns:
      a new value.
    • getToken

      public String getToken()
      Returns:
      this value's string token.
    • getType

      public MapInfoData.Value.Type getType()
      Returns:
      this value's type.
    • getStringValue

      public String 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

      public String toString()
      Overrides:
      toString in class Object