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) longarrayTotalCount(package private) longcountAtThisValue(package private) intcurrentIndex(package private) HistogramIterationValuecurrentIterationValue(package private) longcurrentValueAtIndexprivate booleanfreshSubBucket(package private) AbstractHistogramhistogramprivate doubleintegerToDoubleValueConversionRatio(package private) longnextValueAtIndex(package private) longprevValueIteratedTo(package private) longtotalCountToCurrentIndex(package private) longtotalCountToPrevIndex(package private) longtotalValueToCurrentIndex
-
Constructor Summary
Constructors Constructor Description AbstractHistogramIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private booleanexhaustedSubBuckets()(package private) doublegetPercentileIteratedFrom()(package private) doublegetPercentileIteratedTo()(package private) longgetValueIteratedTo()booleanhasNext()Returns true if the iteration has more elements.(package private) abstract voidincrementIterationLevel()(package private) voidincrementSubBucket()HistogramIterationValuenext()Returns the next element in the iteration.(package private) abstract booleanreachedIterationLevel()voidremove()Not supported.(package private) voidresetIterator(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:
hasNextin 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:
nextin interfacejava.util.Iterator<HistogramIterationValue>- Returns:
- the
HistogramIterationValueassociated with the next element in the iteration.
-
remove
public void remove()
Not supported. Will throw anUnsupportedOperationException.- Specified by:
removein 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()
-
-