public class LinearIterator extends AbstractHistogramIterator implements java.util.Iterator<HistogramIterationValue>
Modifier and Type | Field and Description |
---|---|
private long |
currentStepHighestValueReportingLevel |
private long |
currentStepLowestValueReportingLevel |
private long |
valueUnitsPerBucket |
arrayTotalCount, countAtThisValue, currentIndex, currentIterationValue, currentValueAtIndex, histogram, nextValueAtIndex, prevValueIteratedTo, totalCountToCurrentIndex, totalCountToPrevIndex, totalValueToCurrentIndex
Constructor and Description |
---|
LinearIterator(AbstractHistogram histogram,
long valueUnitsPerBucket) |
Modifier and Type | Method and Description |
---|---|
(package private) long |
getValueIteratedTo() |
boolean |
hasNext()
Returns true if the iteration has more elements.
|
(package private) void |
incrementIterationLevel() |
(package private) boolean |
reachedIterationLevel() |
private void |
reset(AbstractHistogram histogram,
long valueUnitsPerBucket) |
void |
reset(long valueUnitsPerBucket)
Reset iterator for re-use in a fresh iteration over the same histogram data set.
|
getPercentileIteratedFrom, getPercentileIteratedTo, incrementSubBucket, next, remove, resetIterator
private long valueUnitsPerBucket
private long currentStepHighestValueReportingLevel
private long currentStepLowestValueReportingLevel
public LinearIterator(AbstractHistogram histogram, long valueUnitsPerBucket)
histogram
- The histogram this iterator will operate onvalueUnitsPerBucket
- The size (in value units) of each bucket iteration.public void reset(long valueUnitsPerBucket)
valueUnitsPerBucket
- The size (in value units) of each bucket iteration.private void reset(AbstractHistogram histogram, long valueUnitsPerBucket)
public boolean hasNext()
AbstractHistogramIterator
hasNext
in interface java.util.Iterator<HistogramIterationValue>
hasNext
in class AbstractHistogramIterator
void incrementIterationLevel()
incrementIterationLevel
in class AbstractHistogramIterator
long getValueIteratedTo()
getValueIteratedTo
in class AbstractHistogramIterator
boolean reachedIterationLevel()
reachedIterationLevel
in class AbstractHistogramIterator