Java Parse Number parseNumber(String number)

Here you can find the source of parseNumber(String number)

Description

parse Number

License

Open Source License

Declaration

public static double parseNumber(String number) throws ParseException 

Method Source Code

//package com.java2s;
// modify it under the terms of the GNU General Public License

import java.text.NumberFormat;
import java.text.ParseException;

public class Main {
    private static NumberFormat NUMBER_PARSE = NumberFormat.getNumberInstance();

    public static double parseNumber(String number) throws ParseException {
        synchronized (NUMBER_PARSE) {
            return NUMBER_PARSE.parse(number.trim()).doubleValue();
        }//w  ww .  ja v  a 2s .co  m
    }
}

Related

  1. parseNum(String numStr)
  2. parseNumber(CharacterIterator it)
  3. parseNumber(final String source, final String conversionPattern)
  4. parseNumber(String number)
  5. parseNumber(String s)
  6. parseNumber(String text, Class targetClass)
  7. parseNumber(String text, Class targetClass, NumberFormat numberFormat)