![JAR search and dependency download from the Maven repository](/logo.png)
com.github.dakusui.lisj.func.io.Print Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcunit Show documentation
Show all versions of jcunit Show documentation
Automated combinatorial testing framework on top of JUnit
package com.github.dakusui.lisj.func.io;
import java.io.PrintStream;
import com.github.dakusui.jcunit.core.Utils;
import com.github.dakusui.lisj.Context;
import com.github.dakusui.lisj.FormResult;
import com.github.dakusui.lisj.func.BaseFunc;
import static com.github.dakusui.lisj.Basic.*;
public class Print extends BaseFunc {
/**
* Serial version UID.
*/
private static final long serialVersionUID = -2851340410686011195L;
@Override
protected FormResult evaluateLast(Context context, Object[] evaluatedParams, FormResult lastResult) {
FormResult ret = lastResult;
PrintStream pw = Utils.cast(PrintStream.class, Utils.checknull(evaluatedParams[0]));
String s = Utils.checknull(evaluatedParams[1]).toString();
pw.print(s);
return ret;
}
@Override
protected Object checkParams(Object params) {
if (length(super.checkParams(params)) != 2) throw new IllegalArgumentException();
Utils.checknull(get(params, 0));
return params;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy