Parses the current token as a double-precision floating point value.
@param parser
@return {@link Double}
@throws IOException
@throws JsonFormatException
@author vvakame
552980
public static Double parserDouble(JsonPullParser parser) throws IOException,
			JsonFormatException {

		State eventType = parser.getEventType();
		if (eventType == State.VALUE_NULL) {
			return null;
		} else if (eventType == State.VALUE_DOUBLE) {
			return parser.getValueDouble();
		} else {
			throw new IllegalStateException("unexpected state. expected=VALUE_DOUBLE, but get="
					+ eventType.toString());
		}
	}
923539
public double getDouble(String key, double defaultValue) {
    String value = get(key);
    return value == null ? defaultValue : Double.parseDouble(value);
  }
590898
public Object parseValue() {
    Object val;
    switch(T.getType()) {
      case LCURLY:
        val = parseObject();
        break;
      case LSQUARE:
        val = parseArray();
        break;
      case INTEGER:
        if(useBig) {
          val = new BigInteger(T.getString());
        } else {
          try {
            val = Integer.parseInt(T.getString());
          } catch(NumberFormatException e0) {
            // we have an overflow, the tokenizer guarantees the format is correct
            try {
              val = Long.parseLong(T.getString());
            } catch(NumberFormatException e1) {
              val = 0;
            }
          }
        }
        advance();
        break;
      case DOUBLE:
        if(useBig) {
          val = new BigDecimal(T.getString());
        } else {
          val = Double.parseDouble(T.getString());
        }
        advance();
        break;
      case STRING:
        val = T.getString();
        advance();
        break;
      case TRUE:
        val = true;
        advance();
        break;
      case FALSE:
        val = false;
        advance();
        break;
      case NULL:
        val = null;
        advance();
        break;
      default:
        val = null;
        addError();
    }
    return val;
  }
488447
static UTF8StreamJsonParser newJsonParser(InputStream in, byte[] buf,
            int offset, int limit, boolean bufferRecyclable, IOContext context)
            throws IOException
    {
        return new UTF8StreamJsonParser(context,
                DEFAULT_JSON_FACTORY.getParserFeatures(), in,
                DEFAULT_JSON_FACTORY.getCodec(),
                DEFAULT_JSON_FACTORY.getRootByteSymbols().makeChild(1),
                buf, offset, limit, bufferRecyclable);
    }
1088587
public static final Double parseCurrency(Number value)
   {
      return (value == null ? null : NumberHelper.getDouble(value.doubleValue() / 100));
   }
678635
public List<Double> parse(String values) {
        List<Double> inputValues = new ArrayList<Double>();
        if (!(values.isEmpty() || values.charAt(0) == '#')) {
            StringTokenizer tokenizer = new StringTokenizer(values);
            while (tokenizer.hasMoreTokens()) {
                inputValues.add(Op.toDouble(tokenizer.nextToken()));
            }
        }
        return inputValues;
    }
1245826
@Nonnull
  public static ESuccess parseJson (@Nonnull @WillClose final Reader aReader,
                                    @Nonnull final IJsonParserHandler aParserHandler)
  {
    return parseJson (aReader, aParserHandler, (IJsonParserCustomizeCallback) null, (IJsonParseExceptionCallback) null);
  }
593970
public void parseReader(Reader reader) throws ParserException, IOException {

        try {
            nanoElement.parseFromReader(reader);
        } catch (XMLParseException e) {
            throw new ParserException(e.getMessage());
        }
    }
734
public static UTF8StreamJsonParser newJsonParser(InputStream in, byte[] buf,
            int offset, int limit) throws IOException
    {
        return newJsonParser(in, buf, offset, limit, false,
                new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(), in,
                        false));
    }
1257419
function Parser() {
  this.internalParser = new JsonParser();
  this.originalOnToken = this.internalParser.onToken;
  this.internalParser.onToken = onToken.bind(this);
  return this.internalParser;
}
507749
final public void FloatingPoint() throws ParseException {
                                       /*@bgen(jjtree) FloatingPoint */
                                        AstFloatingPoint jjtn000 = new AstFloatingPoint(JJTFLOATINGPOINT);
                                        boolean jjtc000 = true;
                                        jjtree.openNodeScope(jjtn000);Token t = null;
    try {
      t = jj_consume_token(FLOATING_POINT_LITERAL);
                                 jjtree.closeNodeScope(jjtn000, true);
                                 jjtc000 = false;
                                 jjtn000.setImage(t.image);
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
331399
public static List<Double> parserDoubleList(JsonPullParser parser) throws IOException,
			JsonFormatException {

		State eventType = parser.getEventType();
		if (eventType == State.VALUE_NULL) {
			return null;
		}
		if (eventType != State.START_ARRAY) {
			throw new IllegalStateException("not started brace!");
		}
		List<Double> list = new ArrayList<Double>();
		while (parser.lookAhead() != State.END_ARRAY) {
			eventType = parser.getEventType();
			if (eventType == State.VALUE_NULL) {
				list.add(null);
			} else if (eventType == State.VALUE_DOUBLE) {
				list.add(parser.getValueDouble());
			} else {
				throw new IllegalStateException("unexpected state. expected=VALUE_DOUBLE, but get="
						+ eventType.toString());
			}
		}
		parser.getEventType();
		return list;
	}
1171336
public double getDouble( String key ) {
      verifyIsNull();
      Object o = get( key );
      if( o != null ){
         try{
            return o instanceof Number ? ((Number) o).doubleValue()
                  : Double.parseDouble( (String) o );
         }catch( Exception e ){
            throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a number." );
         }
      }
      throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a number." );
   }
86579
@SuppressWarnings("unchecked")
  <T> T parse(Class<T> clazz) throws JsonParserException {
    advanceToken();
    Object parsed = currentValue();
    if (advanceToken() != Token.EOF)
      throw createParseException(null, "Expected end of input, got " + token, true);
    if (clazz != Object.class && (parsed == null || clazz != parsed.getClass()))
      throw createParseException(null, "JSON did not contain the correct type, expected " + clazz.getName()
          + ".", true);
    return (T)(parsed);
  }
292273
public Map<String, T> parseMap(JsonParser jsonParser) throws IOException {
        HashMap<String, T> map = new HashMap<String, T>();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String key = jsonParser.getText();
            jsonParser.nextToken();
            if (jsonParser.getCurrentToken() == JsonToken.VALUE_NULL) {
                map.put(key, null);
            } else{
                map.put(key, parse(jsonParser));
            }
        }
        return map;
    }
1194472
public static double parseDouble(String val, double defValue){
        if(TextUtils.isEmpty(val)) return defValue;
        try{
            return Double.parseDouble(val);
        }catch(NumberFormatException e){
            return defValue;
        }
    }
693600
public double getDouble(String name) throws JSONException {
		Object object = get(name);
		Double result = JSON.toDouble(object);
		if (result == null) {
			throw JSON.typeMismatch(name, object, "double");
		}
		return result;
	}