本文整理汇总了Java中net.sourceforge.jeval.Evaluator.putVariable方法的典型用法代码示例。如果您正苦于以下问题:Java Evaluator.putVariable方法的具体用法?Java Evaluator.putVariable怎么用?Java Evaluator.putVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.jeval.Evaluator
的用法示例。
在下文中一共展示了Evaluator.putVariable方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNumberApplicationProfiles
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getNumberApplicationProfiles(String jobPosition, int noCompanies) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("numberApplicationProfiles." + jobPosition.toLowerCase()));
eval.putVariable("noCompanies", Integer.toString(noCompanies));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例2: getSalary
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getSalary(int qualification) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("salary"));
eval.putVariable("qualification", Integer.toString(qualification));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例3: getFoodPriceChange
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized double getFoodPriceChange(double currentPrice) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("foodPriceChange"));
eval.putVariable("currentPrice", Double.toString(currentPrice));
return Double.parseDouble(eval.evaluate());
}
示例4: getBaseGuests
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getBaseGuests(int noCompanies) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("baseGuests"));
eval.putVariable("noCompanies", Integer.toString(noCompanies));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例5: getRndGuests
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getRndGuests(int noCompanies) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("rndGuests"));
eval.putVariable("noCompanies", Integer.toString(noCompanies));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例6: getSalePrice
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getSalePrice(int locationQuality, int locationSize) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("salePrice"));
eval.putVariable("locationQuality", Integer.toString(locationQuality));
eval.putVariable("locationSize", Integer.toString(locationSize));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例7: getLeaseCosts
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getLeaseCosts(int locationQuality, int locationSize) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("leaseCosts"));
eval.putVariable("locationQuality", Integer.toString(locationQuality));
eval.putVariable("locationSize", Integer.toString(locationSize));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例8: getNumberCities
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getNumberCities(int noPlayer) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("numberCities"));
eval.putVariable("noPlayer", Integer.toString(noPlayer));
return (int) (Double.parseDouble(eval.evaluate()));
}
示例9: getNumberRealEstateProfiles
import net.sourceforge.jeval.Evaluator; //导入方法依赖的package包/类
@SneakyThrows(value = EvaluationException.class)
public synchronized int getNumberRealEstateProfiles(int noCompanies) {
Evaluator eval = getEval();
eval.parse(prop.getProperty("numberRealEstateProfiles"));
eval.putVariable("noCompanies", Integer.toString(noCompanies));
return (int) (Double.parseDouble(eval.evaluate()));
}