Examples of decimalValue()


Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

            result.setMinimum(minimum.decimalValue());
        }

        JsonNode maximum = rawSchema.get("maximum");
        if (maximum != null) {
            result.setMaximum(maximum.decimalValue());
        }

        JsonNode exclusiveMinimum = rawSchema.get("exclusiveMinimum");
        if (exclusiveMinimum != null) {
            result.setExclusiveMinimum(exclusiveMinimum.booleanValue());
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

    protected final void validateDecimal(final ProcessingReport report,
        final MessageBundle bundle, final FullData data)
        throws ProcessingException
    {
        final JsonNode node = data.getInstance().getNode();
        final BigDecimal instanceValue = node.decimalValue();
        final BigDecimal decimalValue = number.decimalValue();

        final BigDecimal remainder = instanceValue.remainder(decimalValue);

        /*
 
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

    protected void validateDecimal(final ProcessingReport report,
        final MessageBundle bundle, final FullData data)
        throws ProcessingException
    {
        final JsonNode instance = data.getInstance().getNode();
        final BigDecimal instanceValue = instance.decimalValue();
        final BigDecimal decimalValue = number.decimalValue();

        final int cmp = instanceValue.compareTo(decimalValue);

        if (cmp > 0)
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

    protected void validateDecimal(final ProcessingReport report,
        final MessageBundle bundle, final FullData data)
        throws ProcessingException
    {
        final JsonNode instance = data.getInstance().getNode();
        final BigDecimal instanceValue = instance.decimalValue();
        final BigDecimal decimalValue = number.decimalValue();

        final int cmp = instanceValue.compareTo(decimalValue);

        if (cmp < 0)
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

                ? FACTORY.numberNode(node.intValue())
                : FACTORY.numberNode(node.longValue()));
            return ret;
        }

        final BigDecimal decimal = node.decimalValue();
        ret.put(keyword, decimal.scale() == 0
            ? FACTORY.numberNode(decimal.toBigIntegerExact())
            : node);

        return ret;
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

                Iterator<String> iter = parsed.fieldNames();
                while (iter.hasNext()) {
                    String field = iter.next();
                    JsonNode value = parsed.get(field);
                    if (value.isBigDecimal()) {
                        call.setBigDecimal(field, value.decimalValue());
                    }
                    else if (value.isBoolean()) {
                        call.setBoolean(field, value.asBoolean());
                    }
                    else if (value.isDouble()) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.decimalValue()

                } else if (value.isLong()) {
                    tree.setProperty(name, value.asLong());
                } else if (value.isDouble()) {
                    tree.setProperty(name, value.asDouble());
                } else if (value.isBigDecimal()) {
                    tree.setProperty(name, value.decimalValue());
                } else {
                    tree.setProperty(name, value.asText());
                }
            }
        }
View Full Code Here

Examples of net.fortytwo.ripple.model.NumericValue.decimalValue()

    private Object toJavaObject(final RippleValue v) throws ScriptException {
        if (v instanceof NumericValue) {
            NumericValue n = (NumericValue) v;
            switch (n.getDatatype()) {
                case DECIMAL:
                    return n.decimalValue();
                case DOUBLE:
                    return n.doubleValue();
                case FLOAT:
                    return n.floatValue();
                case INTEGER:
View Full Code Here

Examples of net.fortytwo.ripple.model.NumericValue.decimalValue()

            case FLOAT:
                return new SesameNumericValue(Math.abs(a.floatValue()));
            case DOUBLE:
                return new SesameNumericValue(Math.abs(a.doubleValue()));
            case DECIMAL:
                return new SesameNumericValue(a.decimalValue().abs());
            default:
                // This shouldn't happen.
                return null;
        }
    }
View Full Code Here

Examples of net.fortytwo.ripple.model.NumericValue.decimalValue()

                return new SesameNumericValue(-a.floatValue());
            case DOUBLE:
                // Note: avoids negative zero.
                return new SesameNumericValue(0.0 - a.doubleValue());
            case DECIMAL:
                return new SesameNumericValue(a.decimalValue().negate());
            default:
                // This shouldn't happen.
                return null;
        }
    }
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.