当前位置: 首页>>代码示例>>Java>>正文


Java OptionalUtils类代码示例

本文整理汇总了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");
}
 
开发者ID:BBN-E,项目名称:bue-common-open,代码行数:17,代码来源:BootstrapWriter.java

示例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);
  }
}
 
开发者ID:BBN-E,项目名称:bue-common-open,代码行数:17,代码来源:BootstrapWriter.java

示例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");
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:15,代码来源:EAScoringObserver.java


注:本文中的com.bbn.bue.common.OptionalUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。