Top Description Fields Constructors Methods
org.HdrHistogram

public Class PercentileIterator

extends AbstractHistogramIterator
implements Iterator<HistogramIterationValue>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Imports
java.util.Iterator

Used for iterating through histogram values according to percentile levels. The iteration is performed in steps that start at 0% and reduce their distance to 100% according to the percentileTicksPerHalfDistance parameter, ultimately reaching 100% when all recorded histogram values are exhausted.

Field Summary

Modifier and TypeField and Description
pack-priv double
pack-priv double
pack-priv int
pack-priv boolean
Inherited from org.HdrHistogram.AbstractHistogramIterator:
arrayTotalCountcountAtThisValuecurrentIndexcurrentIterationValuecurrentValueAtIndexhistogramnextValueAtIndexprevValueIteratedTototalCountToCurrentIndextotalCountToPrevIndextotalValueToCurrentIndex

Constructor Summary

AccessConstructor and Description
public
PercentileIterator(final AbstractHistogram
The histogram this iterator will operate on
histogram
,
final int
The number of equal-sized iteration steps per half-distance to 100%.
percentileTicksPerHalfDistance
)

Method Summary

Modifier and TypeMethod and Description
pack-priv double
pack-priv double
public boolean
hasNext()

Overrides org.HdrHistogram.AbstractHistogramIterator.hasNext.

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
pack-priv void
pack-priv boolean
public void
reset(final int
The number of iteration steps per half-distance to 100%.
percentileTicksPerHalfDistance
)

Reset iterator for re-use in a fresh iteration over the same histogram data set.

private void
reset(final AbstractHistogram histogram, final int percentileTicksPerHalfDistance)

Inherited from org.HdrHistogram.AbstractHistogramIterator:
getValueIteratedToincrementSubBucketnextremoveresetIterator

Field Detail

percentileLevelToIterateFromback to summary
pack-priv double percentileLevelToIterateFrom
percentileLevelToIterateToback to summary
pack-priv double percentileLevelToIterateTo
percentileTicksPerHalfDistanceback to summary
pack-priv int percentileTicksPerHalfDistance
reachedLastRecordedValueback to summary
pack-priv boolean reachedLastRecordedValue

Constructor Detail

PercentileIteratorback to summary
public PercentileIterator(final AbstractHistogram histogram, final int percentileTicksPerHalfDistance)
Parameters
histogram:AbstractHistogram

The histogram this iterator will operate on

percentileTicksPerHalfDistance:int

The number of equal-sized iteration steps per half-distance to 100%.

Method Detail

getPercentileIteratedFromback to summary
pack-priv double getPercentileIteratedFrom()

Overrides org.HdrHistogram.AbstractHistogramIterator.getPercentileIteratedFrom.

Annotations
@Override
getPercentileIteratedToback to summary
pack-priv double getPercentileIteratedTo()

Overrides org.HdrHistogram.AbstractHistogramIterator.getPercentileIteratedTo.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Overrides org.HdrHistogram.AbstractHistogramIterator.hasNext.

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.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.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
incrementIterationLevelback to summary
pack-priv void incrementIterationLevel()

Implements abstract org.HdrHistogram.AbstractHistogramIterator.incrementIterationLevel.

Annotations
@Override
reachedIterationLevelback to summary
pack-priv boolean reachedIterationLevel()

Implements abstract org.HdrHistogram.AbstractHistogramIterator.reachedIterationLevel.

Returns:boolean

Doc from org.HdrHistogram.AbstractHistogramIterator.reachedIterationLevel.

true if the current position's data should be emitted by the iterator

Annotations
@Override
resetback to summary
public void reset(final int percentileTicksPerHalfDistance)

Reset iterator for re-use in a fresh iteration over the same histogram data set.

Parameters
percentileTicksPerHalfDistance:int

The number of iteration steps per half-distance to 100%.

resetback to summary
private void reset(final AbstractHistogram histogram, final int percentileTicksPerHalfDistance)