Package org.jboss.gwt.circuit.sample.calculator.Term

Examples of org.jboss.gwt.circuit.sample.calculator.Term.Op


                }

                StringBuilder message = new StringBuilder();
                Set<Op> keys = termsByOp.keySet();
                for (Iterator<Op> iterator = keys.iterator(); iterator.hasNext(); ) {
                    Op key = iterator.next();
                    message.append(key.name()).append("(").append(termsByOp.get(key).size()).append(")");
                    if (iterator.hasNext()) {
                        message.append(", ");
                    }
                }
                System.out.printf("Operation stats:    %s\n", message);
View Full Code Here


    private List<Action> actionStream(int size) {
        Random random = new Random();
        List<Action> actions = new ArrayList<>(size);

        for (int i = 0; i < size; i++) {
            Op op = Op.values()[random.nextInt(Op.values().length)];
            boolean noop = 1 + random.nextInt(11) % 4 == 4;
            Action action = noop ? new NoopAction() : new TermAction(
                    new Term(1 + random.nextInt(10), op, 1 + random.nextInt(10)));
            actions.add(action);
        }
View Full Code Here

                }

                StringBuilder message = new StringBuilder();
                Set<Op> keys = termsByOp.keySet();
                for (Iterator<Op> iterator = keys.iterator(); iterator.hasNext(); ) {
                    Op key = iterator.next();
                    message.append(key.name()).append("(").append(termsByOp.get(key).size()).append(")");
                    if (iterator.hasNext()) {
                        message.append(", ");
                    }
                }
                System.out.printf("Operation stats:    %s\n", message);
View Full Code Here

    private List<Action> actionStream(int size) {
        Random random = new Random();
        List<Action> actions = new ArrayList<>(size);

        for (int i = 0; i < size; i++) {
            Op op = Op.values()[random.nextInt(Op.values().length)];
            boolean noop = 1 + random.nextInt(11) % 4 == 4;
            Action action = noop ? new NoopAction() : new Term(1 + random.nextInt(10), op, 1 + random.nextInt(10));
            actions.add(action);
        }
        return actions;
View Full Code Here

TOP

Related Classes of org.jboss.gwt.circuit.sample.calculator.Term.Op

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.