Examples of doubleValue()


Examples of java.math.BigDecimal.doubleValue()

                        if (num == null) {
                            break;
                        }

                        if (num.scale() > 0) {
                            return new Double(num.doubleValue());
                        } else {
                            return new Long(num.longValue());
                        }

                    case Types.VARBINARY:
View Full Code Here

Examples of java.math.BigDecimal.doubleValue()

        return values.get(index);
      case SUM:
        BigDecimal sum = new BigDecimal(0);
        for (int i = 0; i < values.size(); ++i)
          sum = sum.add(new BigDecimal(values.get(i)));
        return sum.doubleValue();
      case MIN:
        BigDecimal minimum = new BigDecimal(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(new BigDecimal(values.get(i))) > 0)
            minimum = new BigDecimal(values.get(i));
View Full Code Here

Examples of java.math.BigDecimal.doubleValue()

      case MIN:
        BigDecimal minimum = new BigDecimal(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(new BigDecimal(values.get(i))) > 0)
            minimum = new BigDecimal(values.get(i));
        return minimum.doubleValue();
      case MAX:
        BigDecimal maximum = new BigDecimal(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(new BigDecimal(values.get(i))) < 0)
            maximum = new BigDecimal(values.get(i));
View Full Code Here

Examples of java.math.BigDecimal.doubleValue()

      case MAX:
        BigDecimal maximum = new BigDecimal(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(new BigDecimal(values.get(i))) < 0)
            maximum = new BigDecimal(values.get(i));
        return maximum.doubleValue();
      case FIRST:
        return values.get(0);
      case LAST:
        return values.get(values.size() - 1);
      default:
View Full Code Here

Examples of java.math.BigDecimal.doubleValue()

            DataAxisProperties yaxis = new DataAxisProperties();

            try {
                BigDecimal round = new BigDecimal(max / 1000d);
                round = round.setScale(0, BigDecimal.ROUND_UP);
                double topValue = round.doubleValue() * 1000;
                yaxis.setUserDefinedScale(0, 500);
                yaxis.setNumItems((int) (topValue / 500)+1);
                yaxis.setShowGridLines(1);
            } catch (PropertyException e) {
                log.warn("",e);
View Full Code Here

Examples of java.math.BigDecimal.doubleValue()

    percentGain += 1;

    // change factor is between +/- 20%
    BigDecimal percentGainBD =
      (new BigDecimal(percentGain)).setScale(2, BigDecimal.ROUND_HALF_UP);
    if (percentGainBD.doubleValue() <= 0.0)
      percentGainBD = ONE;

    return percentGainBD;
  }
View Full Code Here

Examples of java.math.BigInteger.doubleValue()

      BigInteger bi = squarD.unscaledValue();     // bi and scale are a tandem
      int biLen = bi.bitLength();
      int shift = Math.max(0, biLen - BITS + (biLen%2 == 0 ? 0 : 1));   // even shift..
      bi = bi.shiftRight(shift);                  // ..floors to 62 or 63 bit BigInteger

      double root = Math.sqrt(bi.doubleValue());
      BigDecimal halfBack = new BigDecimal(BigInteger.ONE.shiftLeft(shift/2));

      int scale = squarD.scale();
      if (scale % 2 == 1) {
          root *= SQRT_10;                        // 5 -> 2, -5 -> -3 need half a scale more..
View Full Code Here

Examples of java.util.Calendar.doubleValue()

            Number max =
               constraint.getMax().getThreshold().length() > 0 ? new Double(constraint.getMax().getThreshold())
                  : Double.MAX_VALUE;
            if (constraint.getMax().isExclusive())
            {
               if (valueNumber.doubleValue() < max.doubleValue())
               {
                  maxInvalid = false;
               }
            }
            else
View Full Code Here

Examples of java.util.Date.doubleValue()

         mvalue = SimpleValueSupport.wrap(jvalue);
      }
      else if(metaType.equals(SimpleMetaType.DOUBLE_PRIMITIVE))
      {
         Double jvalue = Double.valueOf(value);
         double primitive = jvalue.doubleValue();
         mvalue = SimpleValueSupport.wrap(primitive);
      }
      else if(metaType.equals(SimpleMetaType.FLOAT))
      {
         Float jvalue = Float.valueOf(value);
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicInteger.doubleValue()

        MonitorResult monitorResult = new MonitorResult();
        monitorResult.setDescribe("");
        monitorResult.setKey(ConsoleConstant.DUMMY);
        monitorResult.setIp(ip);
        monitorResult.setTime(new Date());
        monitorResult.setValue(count.doubleValue());
        return monitorResult;
    }


    public static boolean IsConnected(String ip, final String toString, String user, String password) {
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.