Package java.math

Examples of java.math.BigInteger.doubleValue()


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


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

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

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

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

    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return DoubleState.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;
      } else if (rightValue.equals(BigInteger.ZERO)) {
        return new DoubleState(value.doubleValue() % rightValue.doubleValue());
      }
      return new IntState(value.remainder(rightValue));
    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
View Full Code Here

    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return DoubleState.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

    } else if (rightOperand instanceof DoubleState) {
      Double rightValue = ((DoubleState) rightOperand).getValue();
      if (rightValue == null) {
        return DoubleState.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

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.