Package clojure.lang

Examples of clojure.lang.LazySeq


    @JRubyMethod
    public IRubyObject compact(ThreadContext context) {
        try {
            Var var = DiametricService.getFn("clojure.core", "remove");
            Var nil_p = DiametricService.getFn("clojure.core", "nil?");
            LazySeq value = (LazySeq) var.invoke(nil_p, vector_or_seq);
            Iterator itr = value.iterator();
            RubyArray result = context.getRuntime().newArray();
            while (itr.hasNext()) {
                Object obj = itr.next();
                result.callMethod("<<", DiametricUtils.convertJavaToRuby(context, obj));
            }
View Full Code Here


    }

    public List<String> getCompletionsForString(String toComplete) {
        List<String> returnThis = new ArrayList<String>();

        LazySeq results = (LazySeq) completions.invoke(toComplete);
        for (Object result : asList(results.toArray())) {
            returnThis.add((String) result);
        }

        return returnThis;
    }
View Full Code Here

     * @param type           The type of paths to extract from the project.  Corresponds with the names of the respective keys in a leiningen project file.  Examples: "resource-paths", "test-paths", or "source-paths"
     * @param leinProjectMap The map to extract values from.
     * @return A list of paths to folders of type.
     */
    public List<String> getPaths(String type, Map leinProjectMap) {
        LazySeq pathStrings = ((LazySeq) leinProjectMap.get(type));
        List<String> results = new ArrayList<String>();
        if (pathStrings != null) {
            for (Object obj : pathStrings) {
                String path = (String) obj;
                results.add(path);
View Full Code Here

TOP

Related Classes of clojure.lang.LazySeq

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.