Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.RippleList.push()


        stack = stack.getRest();

        result = a.add(b);

        solutions.put(
                stack.push(result));
    }

    @Override
    public StackMapping getInverse() throws RippleException {
        return MathLibrary.getSubValue();
View Full Code Here


        } catch (InterruptedException e) {
            throw new RippleException(e);
        }

        solutions.put(
                stack.push(mc.valueOf(exitCode))
                        .push(mc.valueOf(normalOutput))
                        .push(mc.valueOf(errorOutput)));
    }

    private String readInputStream(final InputStream is,
View Full Code Here

        final RippleList rest = arg.getRest();

        Sink<RippleList> listSink = new Sink<RippleList>() {
            public void put(final RippleList list) throws RippleException {
                solutions.put(
                        rest.push(list.getRest()).push(list.getFirst()));
            }
        };

        mc.toList(l, listSink);
    }
View Full Code Here

        stack = stack.getRest();

        result = mc.valueOf((int) Math.floor(a.doubleValue()));

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

            try {
                while (results.hasNext()) {
                    KeyValueValue kv = new SPARQLValue(results.next());

                    try {
                        solutions.put(stack.push(kv));
                    } catch (RippleException e) {
                        // Soft fail
                        e.logError();
                    }
                }
View Full Code Here

        // Apply the function only if it is defined for the given argument.
        if (a > 0) {
            result = mc.valueOf(Math.log10(a));

            solutions.put(
                    stack.push(result));
        }
    }

    @Override
    public StackMapping getInverse() {
View Full Code Here

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

        solutions.put(
                stack.push(y).push(z).push(x).push(w));
    }
}
View Full Code Here

                        // To keep things simple, just eat any errors.
                        logger.severe("error in expression reduction: " + t.getMessage());
                    }
                    return;
                } else {
                    ops = ops.push(first);
                    stack = stack.getRest();
                }
            }
        }
    }
View Full Code Here

            stack = stack.getRest();

            result = mc.valueOf(10).pow(x);

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

                          final ModelConnection mc) throws RippleException {

            RippleList stack = arg;
            StackMapping d = new WhileDecider(stack, program, criterion);

            solutions.put(stack.push(criterion).push(new Operator(d)));
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.