本文整理汇总了Java中com.bbn.bue.common.OptionalUtils类的典型用法代码示例。如果您正苦于以下问题:Java OptionalUtils类的具体用法?Java OptionalUtils怎么用?Java OptionalUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OptionalUtils类属于com.bbn.bue.common包,在下文中一共展示了OptionalUtils类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dumpPercentilesForMetric
import com.bbn.bue.common.OptionalUtils; //导入依赖的package包/类
private void dumpPercentilesForMetric(String chartTitle,
ImmutableMap<String, PercentileComputer.Percentiles> percentilesByRow,
StringBuilder output) {
output.append(chartTitle).append("\n");
final String header = renderLine("Measure", percentilesToPrint());
output.append(header);
// Offset length by one since it include a newline
output.append(Strings.repeat("*", header.length() - 1)).append("\n");
for (final Map.Entry<String, PercentileComputer.Percentiles> percentileEntry : percentilesByRow
.entrySet()) {
output.append(renderLine(percentileEntry.getKey(),
Lists.transform(percentileEntry.getValue().percentiles(percentilesToPrint()),
OptionalUtils.deoptionalizeFunction(Double.NaN))));
}
output.append("\n");
}
示例2: addDelimPercentilesForMetric
import com.bbn.bue.common.OptionalUtils; //导入依赖的package包/类
private void addDelimPercentilesForMetric(
final String key,
final ImmutableMap<String, PercentileComputer.Percentiles> percentilesByRow,
final StringBuilder output) {
// Add entries for each row to the builder
for (final Map.Entry<String, PercentileComputer.Percentiles> percentileEntry : percentilesByRow
.entrySet()) {
final ImmutableList.Builder<String> row = ImmutableList.builder();
row.add(key);
row.add(percentileEntry.getKey());
row.addAll(renderDoubles(Lists.transform(
percentileEntry.getValue().percentiles(percentilesToPrint()),
OptionalUtils.deoptionalizeFunction(Double.NaN))));
renderCells(row.build(), output);
}
}
示例3: dumpPercentilesForMetric
import com.bbn.bue.common.OptionalUtils; //导入依赖的package包/类
private void dumpPercentilesForMetric(String metricName,
ImmutableMap<String, PercentileComputer.Percentiles> percentiles,
Map.Entry<String, Collection<Symbol>> FMeasureSymbol, StringBuilder output) {
output.append(metricName).append(" vs ").append(FMeasureSymbol.getKey()).append("\n\n");
output.append(renderLine("Name", PERCENTILES_TO_PRINT));
output.append(Strings.repeat("*", 70)).append("\n");
for (final Map.Entry<String, PercentileComputer.Percentiles> percentileEntry : percentiles
.entrySet()) {
output.append(renderLine(percentileEntry.getKey(),
Lists.transform(percentileEntry.getValue().percentiles(PERCENTILES_TO_PRINT),
OptionalUtils.deoptionalizeFunction(Double.NaN))));
}
output.append("\n\n\n");
}