cfml.parsing.util.ArrayBuilder Maven / Gradle / Ivy
package cfml.parsing.util;
import java.util.ArrayList;
import java.util.List;
import cfml.parsing.cfscript.CFExpression;
import cfml.parsing.cfscript.script.CFScriptStatement;
public class ArrayBuilder {
public static List createCFExpression(@SuppressWarnings("unchecked") final E... args) {
final ArrayList retval = new ArrayList();
for (final E e : args) {
if (e != null) {
retval.add(e);
}
}
return retval;
}
public static List createCFScriptStatement(
@SuppressWarnings("unchecked") final E... args) {
final ArrayList retval = new ArrayList();
for (final E e : args) {
if (e != null) {
retval.add(e);
}
}
return retval;
}
}