Package java.math

Examples of java.math.BigInteger.doubleValue()


         result = u.toString();
      }
      else if(typeCode == XS_UNSIGNEDLONG)
      {
         BigInteger d = (BigInteger)value;
         if (d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
         {
            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
         }
         result = d.toString();
      }
View Full Code Here


     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.doubleValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
      return (double) getNativeFloat(columnIndex + 1);
    case MysqlDefs.FIELD_TYPE_BIT:
      return getNumericRepresentationOfSQLBitType(columnIndex + 1);
    default:
View Full Code Here

         }
      }
      else if(typeCode == XS_UNSIGNEDLONG)
      {
         BigInteger d = new BigInteger(value);
         if(d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
         {
            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
         }
         result = d;
      }
View Full Code Here

         }
      }
      else if(typeCode == XS_UNSIGNEDLONG)
      {
         BigInteger d = new BigInteger(value);
         if(d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
         {
            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
         }
         result = d;
      }
View Full Code Here

         result = u.toString();
      }
      else if(typeCode == XS_UNSIGNEDLONG)
      {
         BigInteger d = (BigInteger)value;
         if (d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
         {
            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
         }
         result = d.toString();
      }
View Full Code Here

         result = u.toString();
      }
      else if(typeCode == XS_UNSIGNEDLONG)
      {
         BigInteger d = (BigInteger)value;
         if (d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
         {
            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
         }
         result = d.toString();
      }
View Full Code Here

            SessionID id = _model.getSessionIDAt(_key, item);
            BigInteger bi = _model.getSessionIDValue(_key, id);
            if (bi == null) {
                return 0;
            } else {
                return bi.doubleValue();
            }
        }
       
        public void calculatorChanged(String key) {
            if (key.equals(_key)) fireDatasetChanged();
View Full Code Here

    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return UNKNOWN_VALUE;
      }
      return new DoubleState(value.doubleValue() + rightValue.doubleValue());
    } else if (rightOperand instanceof DynamicState || rightOperand instanceof NumState) {
      return UNKNOWN_VALUE;
    }
    throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
  }
View Full Code Here

    if (rightOperand instanceof IntState) {
      BigInteger rightValue = ((IntState) rightOperand).getValue();
      if (rightValue == null) {
        return UNKNOWN_VALUE;
      }
      return new DoubleState(value.doubleValue() / rightValue.doubleValue());
    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return UNKNOWN_VALUE;
      }
View Full Code Here

    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return UNKNOWN_VALUE;
      }
      return new DoubleState(value.doubleValue() / rightValue.doubleValue());
    } else if (rightOperand instanceof DynamicState || rightOperand instanceof NumState) {
      return UNKNOWN_VALUE;
    }
    throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
  }
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.