net.grinder.statistics
Interface ImmutableStatisticsSet

All Known Subinterfaces:
StatisticsSet

public interface ImmutableStatisticsSet

Read-only view of a statistics set, see StatisticsSet.

Author:
Philip Aston

Method Summary
 long getCount(net.grinder.statistics.StatisticsIndexMap.SampleIndex index)
          Get the number of samples for the sample statistic specified by index.
 double getSum(StatisticsIndexMap.DoubleSampleIndex index)
          Get the total sample value for the sample statistic specified by index.
 long getSum(StatisticsIndexMap.LongSampleIndex index)
          Get the total sample value for the sample statistic specified by index.
 double getValue(StatisticsIndexMap.DoubleIndex index)
          Return the value specified by index.
 long getValue(StatisticsIndexMap.LongIndex index)
          Return the value specified by index.
 double getVariance(net.grinder.statistics.StatisticsIndexMap.SampleIndex index)
          Get the sample variance for the sample statistic specified by index.
 boolean isComposite()
          Return whether this statistics set has been marked as containing composite statistics.
 boolean isZero()
          Return whether all the statistics are zero.
 StatisticsSet snapshot()
          Clone this object.
 

Method Detail

snapshot

StatisticsSet snapshot()
Clone this object.

Returns:
A copy of this StatisticsSet.

getValue

long getValue(StatisticsIndexMap.LongIndex index)
Return the value specified by index.

Parameters:
index - The index.
Returns:
The value.

getValue

double getValue(StatisticsIndexMap.DoubleIndex index)
Return the value specified by index.

Parameters:
index - The index.
Returns:
The value.

getSum

long getSum(StatisticsIndexMap.LongSampleIndex index)
Get the total sample value for the sample statistic specified by index.

Parameters:
index - The index.
Returns:
The sum.

getSum

double getSum(StatisticsIndexMap.DoubleSampleIndex index)
Get the total sample value for the sample statistic specified by index.

Parameters:
index - The index.
Returns:
The sum.

getCount

long getCount(net.grinder.statistics.StatisticsIndexMap.SampleIndex index)
Get the number of samples for the sample statistic specified by index.

Parameters:
index - The index.
Returns:
The count.

getVariance

double getVariance(net.grinder.statistics.StatisticsIndexMap.SampleIndex index)
Get the sample variance for the sample statistic specified by index.

Parameters:
index - The index.
Returns:
The count.

isZero

boolean isZero()
Return whether all the statistics are zero. This allows us to optimise cases where there's no information to be processed.

This method can return false, even if all of the statistics are zero; but if it returns true they are guaranteed to be zero.

Returns:
true => all values are zero.

isComposite

boolean isComposite()
Return whether this statistics set has been marked as containing composite statistics.

Returns:
true => this statistics set contains composite statistics.


Copyright © 2000-2013. All Rights Reserved.