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


Java LongSummaryStatistics.getCount方法代码示例

本文整理汇总了Java中java.util.LongSummaryStatistics.getCount方法的典型用法代码示例。如果您正苦于以下问题:Java LongSummaryStatistics.getCount方法的具体用法?Java LongSummaryStatistics.getCount怎么用?Java LongSummaryStatistics.getCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.LongSummaryStatistics的用法示例。


在下文中一共展示了LongSummaryStatistics.getCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: completeDataBlock

import java.util.LongSummaryStatistics; //导入方法依赖的package包/类
@Override
  public void completeDataBlock() {
      if(pulseLengths.isEmpty()) {
          return;
      }

      ImmutableList<Byte> data = dataBuilder.getData();
      int numBitsInLastByte = dataBuilder.getNumBitsInCurrentByte();

      LongSummaryStatistics zeroStats = getSummaryStats(zeroPulses);
Logger.getLogger(LoaderContextImpl.class.getName()).log(Level.INFO, getSummaryText("zero", ZERO, zeroStats));
      LongSummaryStatistics oneStats = getSummaryStats (onePulses);
Logger.getLogger(LoaderContextImpl.class.getName()).log(Level.INFO, getSummaryText("one", ONE, oneStats));

// TODO: use average ZERO pulse length unless idealised, actually - only create data block if average zero pulse
// credibly resembles the standard zero pulse, the recognition routines seem to be close to handling standard
// speed loaders where the standard routines just have shorter timing constants than the standard ROM routines
      if(data.isEmpty() ||
      	(!PulseUtils.equalWithinResolution(ZERO, zeroStats.getAverage(), resolution) && zeroStats.getCount() != 0) ||
      
      // TODO: use average ONE pulse length unless idealised, actually - only create data block if average one pulse
// credibly resembles the standard one pulse, the recognition routines seem to be close to handling standard
// speed loaders where the standard routines just have shorter timing constants than the standard ROM routines
          (!PulseUtils.equalWithinResolution(ONE, oneStats.getAverage(), resolution) && oneStats.getCount() != 0)) {
      	// Something was wrong with this block as a data block, try again to record it as a plain pulse block
      	completePulseBlock(false);
      	
          return;
}

PZXDataBlock newBlock = 
              new PZXDataBlock(getPulseListForCurrentPulses(), numBitsInLastByte, data);
      
Logger.getLogger(LoaderContextImpl.class.getName()).log(Level.INFO, newBlock.getSummary());
      loaderResult.add(newBlock);
      pulseLengths.clear();
      resetBlock();
  }
 
开发者ID:fmeunier,项目名称:wav2pzx,代码行数:39,代码来源:LoaderContextImpl.java

示例2: of

import java.util.LongSummaryStatistics; //导入方法依赖的package包/类
/**
 * Return a new value object of the statistical summary, currently
 * represented by the {@code statistics} object.
 *
 * @param statistics the creating (mutable) statistics class
 * @return the statistical moments
 */
public static LongSummary of(final LongSummaryStatistics statistics) {
	return new LongSummary(
		statistics.getCount(),
		statistics.getMin(),
		statistics.getMax(),
		statistics.getSum(),
		statistics.getAverage()
	);
}
 
开发者ID:jenetics,项目名称:jenetics,代码行数:17,代码来源:LongSummary.java

示例3: SummaryStatistics

import java.util.LongSummaryStatistics; //导入方法依赖的package包/类
public SummaryStatistics(LongSummaryStatistics statistics) {
	this(statistics.getAverage(), statistics.getMax(),
		statistics.getMin(), statistics.getCount(),
		statistics.getSum());
}
 
开发者ID:sing-group,项目名称:GC4S,代码行数:6,代码来源:ColumnSummaryTabeCellRenderer.java


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