本文整理汇总了Java中com.github.javacliparser.MultiChoiceOption类的典型用法代码示例。如果您正苦于以下问题:Java MultiChoiceOption类的具体用法?Java MultiChoiceOption怎么用?Java MultiChoiceOption使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultiChoiceOption类属于com.github.javacliparser包,在下文中一共展示了MultiChoiceOption类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MultiChoiceOptionEditComponent
import com.github.javacliparser.MultiChoiceOption; //导入依赖的package包/类
public MultiChoiceOptionEditComponent(Option option) {
super(((MultiChoiceOption) option).getOptionLabels());
this.editedOption = (MultiChoiceOption) option;
setSelectedIndex(this.editedOption.getChosenIndex());
}
示例2: setEditState
import com.github.javacliparser.MultiChoiceOption; //导入依赖的package包/类
@Override
public void setEditState(String cliString) {
MultiChoiceOption tempOpt = (MultiChoiceOption) this.editedOption.copy();
tempOpt.setValueViaCLIString(cliString);
setSelectedIndex(tempOpt.getChosenIndex());
}
示例3: WekaClusteringAlgorithm
import com.github.javacliparser.MultiChoiceOption; //导入依赖的package包/类
public WekaClusteringAlgorithm() {
clustererClasses = findWekaClustererClasses();
String[] optionLabels = new String[clustererClasses.length];
String[] optionDescriptions = new String[clustererClasses.length];
for (int i = 0; i < clustererClasses.length; i++) {
optionLabels[i] = clustererClasses[i].getSimpleName();
optionDescriptions[i] = clustererClasses[i].getName();
// We do have the parameter option info, but not really a place to show it somewhere
/*
//System.out.println(clustererClasses[i].getSimpleName());
for (Class c : clustererClasses[i].getInterfaces()) {
if (c.equals(weka.core.OptionHandler.class)) {
try {
Enumeration options = ((weka.core.OptionHandler)clustererClasses[i].newInstance()).listOptions();
while(options.hasMoreElements()){
weka.core.Option o = (weka.core.Option)options.nextElement();
System.out.print(o.synopsis()+" ");
}
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
*/
}
if (clustererClasses != null && clustererClasses.length > 0) {
wekaAlgorithmOption = new MultiChoiceOption("clusterer", 'w',
"Weka cluster algorithm to use.",
optionLabels, optionDescriptions, 6);
} else {
horizonOption = null;
parameterOption = null;
}
}