Package cambridge.runtime

Examples of cambridge.runtime.Iter


    }

    @Override
    public void doExecute(Map<String, Object> bindings, TagNode tag, Writer out) throws TemplateEvaluationException, IOException {
        try {
            Iter iter = new Iter();
            for (int i = from.asInt(bindings); i <= to.asInt(bindings); i++) {
                bindings.put(Expressions.CURRENT_OBJECT, i);
                bindings.put(Expressions.ITER_OBJECT, iter);
                tag.execute(bindings, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " + e.getMessage() +
                    ", on line: " + tag.getBeginLine() + ", column: " + tag.getBeginColumn(),
                    tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
View Full Code Here


    }

    public final void execute(Map<String, Object> bindings, TagNode tag, Writer out) throws TemplateEvaluationException, IOException {
        Object t = bindings.get(getCurrentObjectName());
        Super ts = (Super) bindings.get(getParentObjectName());
        Iter iter = (Iter) bindings.get(getIterObjectName());

        Super s = null;

        if (t != null) {
            s = new Super(t, ts, iter);
View Full Code Here

    }

    @Override
    public void doExecute(Map<String, Object> bindings, TagNode tag, Writer out) throws TemplateEvaluationException, IOException {
        try {
            Iter iter = new Iter();
            int n = number.asInt(bindings);
            for (int i = 0; i != n; i++) {
                bindings.put(Expressions.CURRENT_OBJECT, i);
                bindings.put(Expressions.ITER_OBJECT, iter);
                tag.execute(bindings, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
                    tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
View Full Code Here

            throw new TemplateEvaluationException(e, "Could not execute the expression: " + e.getMessage(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }

    private void iterateIterable(Map<String, Object> bindings, TagNode tag, Writer out, Iterable o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (Object o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateArray(Map<String, Object> bindings, TagNode tag, Writer out, Object[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (Object o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateInt(Map<String, Object> bindings, TagNode tag, Writer out, int[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (int o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateFloat(Map<String, Object> bindings, TagNode tag, Writer out, float[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (float o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateDouble(Map<String, Object> bindings, TagNode tag, Writer out, double[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (double o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateByte(Map<String, Object> bindings, TagNode tag, Writer out, byte[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (byte o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

            iter.next();
        }
    }

    private void iterateChar(Map<String, Object> bindings, TagNode tag, Writer out, char[] o) throws IOException, TemplateEvaluationException {
        Iter iter = new Iter();
        bindings.put(getIterObjectName(), iter);
        for (char o1 : o) {
            bindings.put(getCurrentObjectName(), o1);
            tag.execute(bindings, out);
            iter.next();
        }
    }
View Full Code Here

TOP

Related Classes of cambridge.runtime.Iter

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.