Examples of doubleValue()


Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.TestAnnotation.doubleValue()

        assertTrue(Arrays.equals(new boolean[] { false }, anno1.booleanValues()));
        assertEquals((byte) 0, anno1.byteValue());
        assertArrayEquals(new byte[] { 0 }, anno1.byteValues());
        assertEquals((char) 0, anno1.charValue());
        assertArrayEquals(new char[] { 0 }, anno1.charValues());
        assertEquals(Double.valueOf(0.0), Double.valueOf(anno1.doubleValue()));
        assertTrue(Arrays.equals(new double[] { 0.0 }, anno1.doubleValues()));
        assertEquals(Float.valueOf(0.0f), Float.valueOf(anno1.floatValue()));
        assertTrue(Arrays.equals(new float[] { 0.0f }, anno1.floatValues()));
        assertEquals(0, anno1.intValue());
        assertArrayEquals(new int[] { 0 }, anno1.intValues());
View Full Code Here

Examples of org.apache.hadoop.hive.common.type.HiveDecimal.doubleValue()

    case INT:
    case LONG:
      return ((Number) scalar).doubleValue();
    case DECIMAL:
      HiveDecimal decimalVal = (HiveDecimal) scalar;
      return decimalVal.doubleValue();
    default:
      throw new HiveException("Unsupported type "+typename+" for cast to Double");
    }
  }
View Full Code Here

Examples of org.apache.isis.applib.value.Money.doubleValue()

            return "";
        }
        final Money money = (Money) object;
        final boolean localCurrency = LOCAL_CURRENCY_CODE.equals(money.getCurrency());
        if (localCurrency) {
            return DEFAULT_CURRENCY_FORMAT.format(money.doubleValue());
        } else {
            return DEFAULT_NUMBER_FORMAT.format(money.doubleValue()) + " " + money.getCurrency();
        }
    }
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.value.longs.DoubleFloatingPointValueFacet.doubleValue()

            return intValueFacet.integerValue(value).doubleValue();
        }

        final DoubleFloatingPointValueFacet doubleValueFacet = specification.getFacet(DoubleFloatingPointValueFacet.class);
        if (doubleValueFacet != null) {
            return doubleValueFacet.doubleValue(value).doubleValue();
        }

        final FloatingPointValueFacet floatValueFacet = specification.getFacet(FloatingPointValueFacet.class);
        if (floatValueFacet != null) {
            return floatValueFacet.floatValue(value).doubleValue();
View Full Code Here

Examples of org.apache.pdfbox.cos.COSNumber.doubleValue()

        if (result instanceof COSNumber)
        {
            COSNumber number = (COSNumber) result;
            if (number instanceof COSFloat)
            {
                Double real = number.doubleValue();
                if (real > MAX_POSITIVE_FLOAT || real < MAX_NEGATIVE_FLOAT)
                {
                    addValidationError(new ValidationError(ERROR_SYNTAX_NUMERIC_RANGE,
                            "Float is too long or too small: " + real+"  at offset "+pdfSource.getOffset()));
                }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.doubleValue()

      case TypeIds.T_long :
        return currentConstant.longValue() != otherConstant.longValue();
      case TypeIds.T_float :
        return currentConstant.floatValue() != otherConstant.floatValue();
      case TypeIds.T_double :
        return currentConstant.doubleValue() != otherConstant.doubleValue();
      case TypeIds.T_boolean :
        return currentConstant.booleanValue() != otherConstant.booleanValue();
      case TypeIds.T_JavaLangString :
        return !currentConstant.stringValue().equals(otherConstant.stringValue());
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.doubleValue()

    final int numberOfParens = (doubleLiteral.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
    if (numberOfParens > 0) {
      manageOpeningParenthesizedExpression(doubleLiteral, numberOfParens);
    }
    Constant constant = doubleLiteral.constant;
    if (constant != null && constant.doubleValue() < 0) {
      this.scribe.printNextToken(TerminalTokens.TokenNameMINUS);     
    }
    this.scribe.printNextToken(TerminalTokens.TokenNameDoubleLiteral);

    if (numberOfParens > 0) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.doubleValue()

        case TypeIds.T_byte:
          return new Byte(constant.byteValue());
        case TypeIds.T_char:
          return new Character(constant.charValue());
        case TypeIds.T_double:
          return new Double(constant.doubleValue());
        case TypeIds.T_float:
          return new Float(constant.floatValue());
        case TypeIds.T_int:
          return new Integer(constant.intValue());
        case TypeIds.T_long:
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.doubleValue()

          case TypeIds.T_int : return new Integer(constant.intValue());
          case TypeIds.T_byte : return new Byte(constant.byteValue());
          case TypeIds.T_short : return new Short(constant.shortValue());
          case TypeIds.T_char : return new Character(constant.charValue());
          case TypeIds.T_float : return new Float(constant.floatValue());
          case TypeIds.T_double : return new Double(constant.doubleValue());
          case TypeIds.T_boolean : return constant.booleanValue() ? Boolean.TRUE : Boolean.FALSE;
          case TypeIds.T_long : return new Long(constant.longValue());
          case TypeIds.T_JavaLangString : return constant.stringValue();
        }
        return null;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant.doubleValue()

          contents[contentsOffset++] = (byte) (floatValueIndex >> 8);
          contents[contentsOffset++] = (byte) floatValueIndex;
          break;
        case T_double :
          int doubleValueIndex =
            constantPool.literalIndex(fieldConstant.doubleValue());
          contents[contentsOffset++] = (byte) (doubleValueIndex >> 8);
          contents[contentsOffset++] = (byte) doubleValueIndex;
          break;
        case T_long :
          int longValueIndex =
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.