List of usage examples for org.apache.commons.cli Option getValue
public String getValue()
null
if there is no value. From source file:wvw.utils.cmd.CmdUtils.java
public String toString() { StringBuffer ret = new StringBuffer(); ret.append("- parameters:\n"); int cnt = 0;/*from ww w .j a va 2 s .c o m*/ for (Object obj : processedOptions) { if (cnt++ > 0) ret.append("\n"); if (obj instanceof Option) { Option option = (Option) obj; if (option.hasArg()) ret.append(option.getOpt() + " : " + option.getValue()); else ret.append(option.getOpt()); } else if (obj instanceof CmdOptionVal) { CmdOptionVal option = (CmdOptionVal) obj; if (option.getOption().hasArg()) ret.append(option.getName() + " : " + option.getValue()); else ret.append(option.getName()); } } ret.append("\n"); return ret.toString(); }