Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.RippleValue


    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue l;

        l = stack.getFirst();
        final RippleList rest = stack.getRest();

        Sink<RippleList> listSink = new Sink<RippleList>() {
View Full Code Here


    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue l1, l2;

        l1 = stack.getFirst();
        stack = stack.getRest();
        l2 = stack.getFirst();
        final RippleList rest = stack.getRest();
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {

        RippleValue z, y, x;
        RippleList stack = arg;

// hack...
        z = stack.getFirst();
        stack = stack.getRest();
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;
        RippleValue z, y, x;

        z = stack.getFirst();
        stack = stack.getRest();
        y = stack.getFirst();
        stack = stack.getRest();
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue falseProg = stack.getFirst();
        stack = stack.getRest();
        RippleValue trueProg = stack.getFirst();
        stack = stack.getRest();
        boolean b = mc.toBoolean(stack.getFirst());
        stack = stack.getRest();

        RippleValue result = b ? trueProg : falseProg;

        solutions.put(
                stack.push(result).push(Operator.OP));
    }
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue l;

        l = stack.getFirst();
        final RippleList rest = stack.getRest();

        Sink<RippleList> listSink = new Sink<RippleList>() {
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue s, regex;

        regex = stack.getFirst();
        stack = stack.getRest();
        s = stack.getFirst();
        stack = stack.getRest();
View Full Code Here

        x = mc.toBoolean(stack.getFirst());
        stack = stack.getRest();
        y = mc.toBoolean(stack.getFirst());
        stack = stack.getRest();

        RippleValue result = mc.valueOf(x && y);

        solutions.put(
                stack.push(result));
    }
View Full Code Here

                x = mc.toBoolean(stack.getFirst());
                stack = stack.getRest();

                if (x) {
                    RippleValue t = mc.valueOf(true);
                    solutions.put(stack.push(t).push(t));
                } else {
                    RippleValue t = mc.valueOf(true);
                    RippleValue f = mc.valueOf(false);
                    solutions.put(stack.push(t).push(f));
                    solutions.put(stack.push(f).push(t));
                    solutions.put(stack.push(f).push(f));
                }
            }
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue a = stack.getFirst();
        stack = stack.getRest();

        String result = StringUtils.md5SumOf(mc.toString(a));
        solutions.put(stack.push(
                StringLibrary.value(result, mc, a)));
View Full Code Here

TOP

Related Classes of net.fortytwo.ripple.model.RippleValue

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.