Examples of asDouble()


Examples of org.jboss.dmr.ModelNode.asDouble()

                        break;
                    case BYTES:
                        node.set(node.asBytes());
                        break;
                    case DOUBLE:
                        node.set(node.asDouble());
                        break;
                    case INT:
                        node.set(node.asInt());
                        break;
                    case LONG:
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asDouble()

                            break;
                        case BYTES:
                            toSet.set(modelValue.asBytes());
                            break;
                        case DOUBLE:
                            toSet.set(modelValue.asDouble());
                            break;
                        case INT:
                            toSet.set(modelValue.asInt());
                            break;
                        case LONG:
View Full Code Here

Examples of org.jboss.dmr.client.ModelNode.asDouble()

                        value = -1;
                }
                else if("java.lang.Double".equals(propBinding.getJavaTypeName()))
                {
                    if(propValue.isDefined())
                        value = propValue.asDouble();
                    else
                        value = -1.0;
                }
                else if("java.lang.Float".equals(propBinding.getJavaTypeName()))
                {
View Full Code Here

Examples of org.jboss.dmr.client.ModelNode.asDouble()

                        value = -1.0;
                }
                else if("java.lang.Float".equals(propBinding.getJavaTypeName()))
                {
                    if(propValue.isDefined())
                        value = propValue.asDouble();
                    else
                        value = -1.0;
                }
                else if("java.lang.String".equals(propBinding.getJavaTypeName()))
                {
View Full Code Here

Examples of org.polyglotted.xpathstax.data.Value.asDouble()

        XPathStaxParser parser = new XPathStaxParser();
        parser.addHandler(new XPathRequest("/catalog/book[@id='bk101']/price"), new NodeHandler() {
            @Override
            public void processNode(XmlNode xmlNode) {
                Value count = xmlNode.getText();
                assertEquals(44.95, count.asDouble(), 0.001);            }

            @Override
            public void elementStart(String elementName) {
                assertEquals("price", elementName);
            }
View Full Code Here

Examples of org.rosuda.REngine.REXP.asDouble()

        if (rdata instanceof REXPInteger) {
          return new IntWritable(rdata.asInteger());
        } else if (rdata instanceof REXPString) {
          return new Text(rdata.asString());
        } else if (rdata instanceof REXPDouble) {
          return new DoubleWritable(rdata.asDouble());
        } else {
          throw new HiveException(
              "only support integer, string and double");
        }
      } catch (Exception e) {
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XNumber.asDouble()

        final String sourceString = firstItem.stringValue();
        final int maxSourceLen = sourceString.length();
        final Item secItem = argv.getItem(1);
        final XNumber secNum = (XNumber) secItem;
        // first character of a string is located at position 1, not position 0.
        final int startingLoc = Math.max(0, (int) Math.round(secNum.asDouble() - 1));
        final int endingLoc;
        final int arglen = argv.size();
        if(arglen == 3) {
            final Item thirdItem = argv.getItem(2);
            final XNumber thirdNum = (XNumber) thirdItem;
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XNumber.asDouble()

        final int endingLoc;
        final int arglen = argv.size();
        if(arglen == 3) {
            final Item thirdItem = argv.getItem(2);
            final XNumber thirdNum = (XNumber) thirdItem;
            final int length = (int) Math.round(thirdNum.asDouble());
            endingLoc = Math.max(0, Math.min(maxSourceLen, length));
        } else {
            endingLoc = maxSourceLen;
        }
        if(endingLoc <= startingLoc) {
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XNumber.asDouble()

                AtomicValue literal = ((LiteralExpr) e).getValue();
                if(literal instanceof XNumber) {
                    DynamicContext probe = DynamicContext.PROBE;
                    probe.setStaticContext(statEnv);
                    XNumber xnum = (XNumber) literal;
                    double xdouble = xnum.asDouble();
                    long xint = xnum.asLong();
                    if(xdouble != xint) {
                        return SequenceExpression.EMPTY_SEQUENCE;
                    }
                    if(xint > Integer.MAX_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.