org.jfree.data.statistics

Class MeanAndStandardDeviation

public class MeanAndStandardDeviation extends Object implements Serializable

A simple data structure that holds a mean value and a standard deviation value. This is used in the DefaultStatisticalCategoryDataset class.
Constructor Summary
MeanAndStandardDeviation(double mean, double standardDeviation)
Creates a new mean and standard deviation record.
MeanAndStandardDeviation(Number mean, Number standardDeviation)
Creates a new mean and standard deviation record.
Method Summary
booleanequals(Object obj)
Tests this instance for equality with an arbitrary object.
NumbergetMean()
Returns the mean.
doublegetMeanValue()
Returns the mean as a double primitive.
NumbergetStandardDeviation()
Returns the standard deviation.
doublegetStandardDeviationValue()
Returns the standard deviation as a double primitive.
StringtoString()
Returns a string representing this instance.

Constructor Detail

MeanAndStandardDeviation

public MeanAndStandardDeviation(double mean, double standardDeviation)
Creates a new mean and standard deviation record.

Parameters: mean the mean. standardDeviation the standard deviation.

MeanAndStandardDeviation

public MeanAndStandardDeviation(Number mean, Number standardDeviation)
Creates a new mean and standard deviation record.

Parameters: mean the mean (null permitted). standardDeviation the standard deviation (null permitted.

Method Detail

equals

public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

getMean

public Number getMean()
Returns the mean.

Returns: The mean.

getMeanValue

public double getMeanValue()
Returns the mean as a double primitive. If the underlying mean is null, this method will return Double.NaN.

Returns: The mean.

Since: 1.0.7

See Also:

getStandardDeviation

public Number getStandardDeviation()
Returns the standard deviation.

Returns: The standard deviation.

getStandardDeviationValue

public double getStandardDeviationValue()
Returns the standard deviation as a double primitive. If the underlying standard deviation is null, this method will return Double.NaN.

Returns: The standard deviation.

Since: 1.0.7

toString

public String toString()
Returns a string representing this instance.

Returns: A string.

Since: 1.0.7

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.