Java Javascript Mozilla Library toList(AstNode... nodes)

Here you can find the source of toList(AstNode... nodes)

Description

to List

License

BSD License

Declaration

public static final List<AstNode> toList(AstNode... nodes) 

Method Source Code


//package com.java2s;
/*/*from  w  w w.  j  av a2 s  .  com*/
 * 06/05/2014
 *
 * Copyright (C) 2014 Robert Futrell
 * robert_futrell at users.sourceforge.net
 * http://fifesoft.com/rsyntaxtextarea
 *
 * This library is distributed under a modified BSD license.  See the included
 * RSTALanguageSupport.License.txt file for details.
 */

import java.util.ArrayList;
import java.util.List;

import org.mozilla.javascript.ast.AstNode;

public class Main {
    public static final List<AstNode> toList(AstNode... nodes) {
        List<AstNode> list = new ArrayList<AstNode>();
        for (AstNode node : nodes) {
            list.add(node);
        }
        return list;
    }
}

Related

  1. stringToNumber(CharSequence string)
  2. stringValue(String name, Scriptable scope)
  3. toInt(Object obj, int defaultValue)
  4. toJavaBoolean(final Scriptable options, final String key)
  5. toJavaInt(final Object fromScript)
  6. toRegExp(String source, String optionsString)
  7. toString(Object val)
  8. trace(Object object)
  9. traceHelper(Function function, Object... args)