org.xerial.json
Class JSONDouble
java.lang.Object
org.xerial.json.JSONDouble
- All Implemented Interfaces:
- JSONNumber, JSONValue
public class JSONDouble
- extends Object
- implements JSONNumber
JSONDouble
public JSONDouble(double value)
JSONDouble
public JSONDouble(String value)
getDoubleValue
public double getDoubleValue()
- Specified by:
getDoubleValue in interface JSONNumber
getIntValue
public int getIntValue()
- Specified by:
getIntValue in interface JSONNumber
getJSONNumber
public JSONNumber getJSONNumber()
- Specified by:
getJSONNumber in interface JSONNumber- Specified by:
getJSONNumber in interface JSONValue
- Returns:
- JSONNumber representation of this object if this instance is a JSONNumber, otherwise null
getJSONArray
public JSONArray getJSONArray()
- Specified by:
getJSONArray in interface JSONValue
- Returns:
- JSONArray representation of this object if this instance is a JSONArray, otherwise null
getJSONBoolean
public JSONBoolean getJSONBoolean()
- Specified by:
getJSONBoolean in interface JSONValue
- Returns:
- JSONBoolean representation of this object if this instance is a JSONBoolean, otherwise null
getJSONNull
public JSONNull getJSONNull()
- Specified by:
getJSONNull in interface JSONValue
- Returns:
- JSONNull representation of this object if this instance is a JSONNull, otherwise null
getJSONObject
public JSONObject getJSONObject()
- Specified by:
getJSONObject in interface JSONValue
- Returns:
- JSONObject representation of this object if this instance is a JSONSObject, otherwise null
getJSONString
public JSONString getJSONString()
- Specified by:
getJSONString in interface JSONValue
- Returns:
- JSONString representation of this object if this instance is a JSONString, otherwise null
toString
public String toString()
- Specified by:
toString in interface JSONNumber- Overrides:
toString in class Object
toJSONString
public String toJSONString()
- Description copied from interface:
JSONValue
- Produces output of the JSON format of this value
- Specified by:
toJSONString in interface JSONValue
- Returns:
- the JSON output
equals
public boolean equals(Object obj)
- Specified by:
equals in interface JSONNumber- Overrides:
equals in class Object
getValueType
public JSONValueType getValueType()
- Description copied from interface:
JSONValue
- Gets the JSON value type of this value
- Specified by:
getValueType in interface JSONValue
- Returns:
- the
JSONValueType

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.