kg.apc.cmdtools.AbstractCMDTool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cmdrunner Show documentation
Show all versions of cmdrunner Show documentation
Universal runner used by JP@GC and PerfMon server agent
package kg.apc.cmdtools;
import java.io.PrintStream;
import java.util.ListIterator;
/**
*
* @author undera
*/
public abstract class AbstractCMDTool {
public AbstractCMDTool() {
}
protected int getLogicValue(String string) {
if (string.equalsIgnoreCase("on")) {
return 1;
}
if (string.equalsIgnoreCase("1")) {
return 1;
}
if (string.equalsIgnoreCase("yes")) {
return 1;
}
if (string.equalsIgnoreCase("true")) {
return 1;
}
return 0;
}
protected abstract int processParams(ListIterator args) throws UnsupportedOperationException, IllegalArgumentException;
protected abstract void showHelp(PrintStream os);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy