FileDocCategorySizeDatePackage
JSONNumber.javaAPI DocExample1477Wed Jul 26 13:30:26 BST 2006com.oreilly.ajax.client

JSONNumber

public class JSONNumber extends JSONValue
Represents a JSON number as read from a JSON encoded string. This class models a number as a string and only converts to an actual representation when asked.

Fields Summary
private String
value
Constructors Summary
public JSONNumber(String value)

    this.value = value;
  
Methods Summary
public bytebyteValue()

    return Byte.parseByte(value);
  
public doubledoubleValue()

    return Double.parseDouble(value);
  
public floatfloatValue()

    return Float.parseFloat(value);
  
public intintValue()

    return Integer.parseInt(value);
  
public com.oreilly.ajax.client.JSONNumberisNumber()

    return this;
  
public longlongValue()

    return Long.parseLong(value);
  
public shortshortValue()

    return Short.parseShort(value);
  
public java.lang.StringtoString()

    return value;