Package java.lang

Examples of java.lang.Double.doubleValue()


    static final Hashtable NEXT_GAUSSIANS = new Hashtable();

    static double polar_random( uniform PRNG )
    {
        Double d = (Double) NEXT_GAUSSIANS.remove(PRNG);
        if (d != null) return d.doubleValue();

        double v1, v2, s;
        do {
            v1 = 2 * PRNG.random() - 1; // between -1 and 1
            v2 = 2 * PRNG.random() - 1; // between -1 and 1
View Full Code Here


  private void reset()
  {
    Double rate = (Double)rates_.get(c2_);
    Date date = new Date();
   
    rate_ = rate.doubleValue();
    dealData_.setSpotRate(rateValidator_.formatRate(rate_));
    rateValidator_.set(rate_);
    dateValidator_.reset();
    dealData_.setValueDate(date);
    dealData_.setTradingDate(date);
View Full Code Here

    }

    if (type.equalsIgnoreCase("double"))
    {
      Double d = new Double(p.getValue());
      stmt.setDouble(pos, d.doubleValue() );
    }

    if (type.equalsIgnoreCase("float"))
    {
      Float f = new Float(p.getValue());
View Full Code Here

    }

    if (type.equalsIgnoreCase("double"))
    {
      Double d = new Double(p.getValue());
      stmt.setDouble(pos, d.doubleValue() );
    }

    if (type.equalsIgnoreCase("float"))
    {
      Float f = new Float(p.getValue());
View Full Code Here

                      // double currency sign.
                      // DATA[i][5] is the currency format result using
                      // triple currency sign.
                      String oneCurrencyFormat = DATA[i][k];
                      if (fmt.parse(oneCurrencyFormat).doubleValue() !=
                          numberToBeFormat.doubleValue()) {
                        errln("FAILED parse " + oneCurrencyFormat);
                      }
                    }
                } catch (ParseException e) {
                    errln("FAILED, DecimalFormat parse currency: " + e.toString());
View Full Code Here

                    // ISOCURRENCYSTYLE formatter.
                    // DATA[i][5] is the currency format result using
                    // PLURALCURRENCYSTYLE formatter.
                    String oneCurrencyFormatResult = DATA[i][j];
                    Number val = numFmt.parse(oneCurrencyFormatResult);
                    if (val.doubleValue() != numberToBeFormat.doubleValue()) {
                        errln("FAIL: getCurrencyFormat of locale " + localeString + " failed roundtripping the number. val=" + val + "; expected: " + numberToBeFormat);
                    }
                }
            }
            catch (ParseException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.