Package org.pdf4j.saxon.value

Examples of org.pdf4j.saxon.value.DoubleValue


            if (position++ >= count) {
                current = null;
                position = -1;
                return null;
            } else {
                current = new DoubleValue(generator.nextDouble());
                return current;
            }
        }
View Full Code Here


        } else if (a == null) {
            return new ComparisonKey(StandardNames.XS_NUMERIC, "NaN");
        } else {
            try {
                double d = Value.stringToNumber(a.getStringValueCS());
                return new ComparisonKey(StandardNames.XS_NUMERIC, new DoubleValue(d));
            } catch (NumberFormatException err) {
                return new ComparisonKey(StandardNames.XS_NUMERIC, "NaN");
            }
        }
    }
View Full Code Here

    private DoubleValue toDoubleValue(NumericValue nv) {
        if (nv instanceof DoubleValue) {
            return ((DoubleValue)nv);
        } else {
            return new DoubleValue(nv.getDoubleValue());
        }
    }
View Full Code Here

            BuiltInAtomicType itemType = soughtValue.getPrimitiveType();
            if (itemType.equals(BuiltInAtomicType.INTEGER) ||
                    itemType.equals(BuiltInAtomicType.DECIMAL) ||
                    itemType.equals(BuiltInAtomicType.FLOAT)) {
                soughtValue = new DoubleValue(((NumericValue)soughtValue).getDoubleValue());
            }
        }

        // If the sought value is untypedAtomic and the equality matching mode is
        // "convertUntypedToOther", then we construct and search one index for each
View Full Code Here

        // If either operand is a number, convert both operands to xs:double using
        // the rules of the number() function, and compare them

        if (t0.isPrimitiveNumeric() || t1.isPrimitiveNumeric()) {
            DoubleValue v0 = NumberFn.convert(a0);
            DoubleValue v1 = NumberFn.convert(a1);
            return ValueComparison.compare(v0, operator, v1, comparer);
        }

        // If either operand is a string, or if both are untyped atomic, convert
        // both operands to strings and compare them
View Full Code Here

TOP

Related Classes of org.pdf4j.saxon.value.DoubleValue

Copyright © 2018 www.massapicom. 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.