Package org.HdrHistogram
Class AbstractHistogramIterator
- java.lang.Object
-
- org.HdrHistogram.AbstractHistogramIterator
-
- All Implemented Interfaces:
java.util.Iterator<HistogramIterationValue>
- Direct Known Subclasses:
AllValuesIterator
,LinearIterator
,LogarithmicIterator
,PercentileIterator
,RecordedValuesIterator
abstract class AbstractHistogramIterator extends java.lang.Object implements java.util.Iterator<HistogramIterationValue>
Used for iterating through histogram values.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
arrayTotalCount
(package private) long
countAtThisValue
(package private) int
currentIndex
(package private) HistogramIterationValue
currentIterationValue
(package private) long
currentValueAtIndex
private boolean
freshSubBucket
(package private) AbstractHistogram
histogram
private double
integerToDoubleValueConversionRatio
(package private) long
nextValueAtIndex
(package private) long
prevValueIteratedTo
(package private) long
totalCountToCurrentIndex
(package private) long
totalCountToPrevIndex
(package private) long
totalValueToCurrentIndex
-
Constructor Summary
Constructors Constructor Description AbstractHistogramIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private boolean
exhaustedSubBuckets()
(package private) double
getPercentileIteratedFrom()
(package private) double
getPercentileIteratedTo()
(package private) long
getValueIteratedTo()
boolean
hasNext()
Returns true if the iteration has more elements.(package private) abstract void
incrementIterationLevel()
(package private) void
incrementSubBucket()
HistogramIterationValue
next()
Returns the next element in the iteration.(package private) abstract boolean
reachedIterationLevel()
void
remove()
Not supported.(package private) void
resetIterator(AbstractHistogram histogram)
-
-
-
Field Detail
-
histogram
AbstractHistogram histogram
-
arrayTotalCount
long arrayTotalCount
-
currentIndex
int currentIndex
-
currentValueAtIndex
long currentValueAtIndex
-
nextValueAtIndex
long nextValueAtIndex
-
prevValueIteratedTo
long prevValueIteratedTo
-
totalCountToPrevIndex
long totalCountToPrevIndex
-
totalCountToCurrentIndex
long totalCountToCurrentIndex
-
totalValueToCurrentIndex
long totalValueToCurrentIndex
-
countAtThisValue
long countAtThisValue
-
freshSubBucket
private boolean freshSubBucket
-
currentIterationValue
final HistogramIterationValue currentIterationValue
-
integerToDoubleValueConversionRatio
private double integerToDoubleValueConversionRatio
-
-
Method Detail
-
resetIterator
void resetIterator(AbstractHistogram histogram)
-
hasNext
public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)- Specified by:
hasNext
in interfacejava.util.Iterator<HistogramIterationValue>
- Returns:
- true if the iterator has more elements.
-
next
public HistogramIterationValue next()
Returns the next element in the iteration.- Specified by:
next
in interfacejava.util.Iterator<HistogramIterationValue>
- Returns:
- the
HistogramIterationValue
associated with the next element in the iteration.
-
remove
public void remove()
Not supported. Will throw anUnsupportedOperationException
.- Specified by:
remove
in interfacejava.util.Iterator<HistogramIterationValue>
-
incrementIterationLevel
abstract void incrementIterationLevel()
-
reachedIterationLevel
abstract boolean reachedIterationLevel()
- Returns:
- true if the current position's data should be emitted by the iterator
-
getPercentileIteratedTo
double getPercentileIteratedTo()
-
getPercentileIteratedFrom
double getPercentileIteratedFrom()
-
getValueIteratedTo
long getValueIteratedTo()
-
exhaustedSubBuckets
private boolean exhaustedSubBuckets()
-
incrementSubBucket
void incrementSubBucket()
-
-