public class HistogramDataPoint extends DataPoint
Modifier and Type | Class and Description |
---|---|
protected static class |
HistogramDataPoint.HistogramIndices
Indices used for storing
HistogramDataPoint contents in a file. |
DataPoint.Indices
ENCODING_CHAR_SET
Constructor and Description |
---|
HistogramDataPoint(InputStream is)
Constructs a
HistogramDataPoint from the specified stream
contents. |
HistogramDataPoint(long lastUpdatedTimeStamp,
long msSpanned,
long count,
double mean,
long minimum,
long maximum,
double standardDeviation)
Constructs a
HistogramDataPoint using the specified values. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object toCompare) |
long |
getCount()
Gets the number of samples encompassed by the histogram.
|
int |
getExpectedFieldCount()
Gets the expected CSV field count for the data type.
|
long |
getMaximum()
Gets the largest of the histogram sample values.
|
double |
getMean()
Gets the arithmetic mean of histogram sample values.
|
long |
getMinimum()
Gets the smallest of the histogram sample values.
|
double |
getStandardDeviation()
Gets the arithmetic standard deviation of histogram sample values.
|
int |
hashCode() |
protected String[] |
prepareArrayFieldsForWriting(String[] fields)
Prepares the provided
String array with values to be written for
this DataPoint . |
void |
set(String[] fields)
Reads the
DataPoint contents from the specified String
array. |
void |
setCount(long toSet)
Sets the number of samples encompassed by the histogram.
|
void |
setMaximum(long toSet)
Sets the largest of the histogram sample values.
|
void |
setMean(double toSet)
Sets the arithmetic mean of histogram sample values.
|
void |
setMinimum(long toSet)
Sets the smallest of the histogram sample values.
|
void |
setStandardDeviation(double toSet)
Sets the arithmetic standard deviation of histogram sample values.
|
String |
toDebugString()
Gets a detailed representation of this object to facilitate debugging.
|
String |
toString() |
getLastUpdatedTimeStamp, getMsSpanned, read, setLastUpdatedTimeStamp, setMsSpanned, write
public HistogramDataPoint(long lastUpdatedTimeStamp, long msSpanned, long count, double mean, long minimum, long maximum, double standardDeviation)
HistogramDataPoint
using the specified values.lastUpdatedTimeStamp
- last updated time stampmsSpanned
- milliseconds spannedcount
- number of sample values encompassed by histogrammean
- arithmetic mean of histogram sample valuesminimum
- smallest of histogram sample valuesmaximum
- largest of histogram sample valuesstandardDeviation
- arithmetic standard deviation of histogram
sample valuespublic HistogramDataPoint(InputStream is) throws DataFormatException, IOException
HistogramDataPoint
from the specified stream
contents.is
- InputStream
to read fromDataFormatException
- if the expected content cannot be readIOException
- if an error occurs while reading from the streampublic long getCount()
public long getMaximum()
public double getMean()
public long getMinimum()
public double getStandardDeviation()
public int getExpectedFieldCount()
DataPoint
getExpectedFieldCount
in class DataPoint
protected String[] prepareArrayFieldsForWriting(String[] fields)
DataPoint
String
array with values to be written for
this DataPoint
.prepareArrayFieldsForWriting
in class DataPoint
fields
- a String
array that will be set with the field
values, in order, to be writtenpublic void set(String[] fields) throws DataFormatException
DataPoint
DataPoint
contents from the specified String
array.set
in class DataPoint
fields
- String
array to read fromDataFormatException
- if the expected file content cannot be readpublic void setCount(long toSet)
toSet
- number of samples encompassed by histogrampublic void setMaximum(long toSet)
toSet
- largest histogram sample valuepublic void setMean(double toSet)
toSet
- arithmetic mean of histogram sample valuespublic void setMinimum(long toSet)
toSet
- smallest histogram sample valuepublic void setStandardDeviation(double toSet)
toSet
- arithmetic standard deviation of histogram sample valuespublic String toDebugString()
DataPoint
toDebugString
in class DataPoint
Copyright © 2015. All Rights Reserved.