Package net.sf.saxon.value

Examples of net.sf.saxon.value.IntegerValue


            currentValue += increment;
            return new IntegerValue(d);
        }

        public Item current() {
            return new IntegerValue(currentValue - increment);
        }
View Full Code Here


        } else if (first instanceof BooleanValue) {
            return ((BooleanValue)first).getBooleanValue() || (iter.next() != null);
        } else if (first instanceof IntegerValue) {
            return ((IntegerValue)first).longValue() == base.position() || (iter.next() != null);
        } else if (first instanceof NumericValue) {
            IntegerValue basePos = new IntegerValue(base.position());
            return first.equals(basePos) || (iter.next() != null);
        } else if (first instanceof StringValue) {
            return !first.getStringValue().equals("") || (iter.next() != null);
        } else {
            return true;
View Full Code Here

    /**
    * Evaluate in a general context
    */

    public Item evaluateItem(XPathContext c) throws XPathException {
        return new IntegerValue(c.getLast());
    }
View Full Code Here

        private void setPosition(int position) {
            this.position = position;
        }

        public Value evaluateVariable(XPathContext context) throws XPathException {
            return new IntegerValue(position);
        }
View Full Code Here

    }

    public Value transform(Object source, TransformationContext context) {
        Value result = null;
        if (source instanceof Integer) {
            result = new IntegerValue((Integer)source);
        } else if (source instanceof Long) {
            result = new IntegerValue((Long)source);
        } else if (source instanceof Short) {
            result = new IntegerValue((Short)source);
        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
View Full Code Here

    }

    public Value transform(Object source, TransformationContext context) {
        Value result = null;
        if (source instanceof Integer) {
            result = new IntegerValue((Integer)source);
        } else if (source instanceof Long) {
            result = new IntegerValue((Long)source);
        } else if (source instanceof Short) {
            result = new IntegerValue((Short)source);
        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
View Full Code Here

    }

    public Value transform(Object source, TransformationContext context) {
        Value result = null;
        if (source instanceof Integer) {
            result = new IntegerValue((Integer)source);
        } else if (source instanceof Long) {
            result = new IntegerValue((Long)source);
        } else if (source instanceof Short) {
            result = new IntegerValue((Short)source);
        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
View Full Code Here

    }

    public Value transform(Object source, TransformationContext context) {
        Value result = null;
        if (source instanceof Integer) {
            result = new IntegerValue((Integer)source);
        } else if (source instanceof Long) {
            result = new IntegerValue((Long)source);
        } else if (source instanceof Short) {
            result = new IntegerValue((Short)source);
        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
View Full Code Here

    }

    public Value transform(Object source, TransformationContext context) {
        Value result = null;
        if (source instanceof Integer) {
            result = new IntegerValue((Integer)source);
        } else if (source instanceof Long) {
            result = new IntegerValue((Long)source);
        } else if (source instanceof Short) {
            result = new IntegerValue((Short)source);
        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
View Full Code Here

                "10");

        final UserFunction fn1 = exp1.getStaticContext().getUserDefinedFunction("f.ns", "t1", 2);
        final Controller controller = exp1.newController();
        final Value[] arglist = new Value[2];
        arglist[0] = new IntegerValue(10);
        for (int i = 3; i < 10; i++) {
            arglist[1] = new IntegerValue(i);
            final ValueRepresentation result = fn1.call(arglist, controller);
            System.out.println(arglist[0] + " div " + arglist[1] + " = " + result);
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.value.IntegerValue

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.