public class RatioGaugeDataPoint extends DataPoint
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RatioGaugeDataPoint.RatioGaugeIndices
Indices used for storing
RatioGaugeDataPoint contents in a file. |
DataPoint.IndicesENCODING_CHAR_SET| Constructor and Description |
|---|
RatioGaugeDataPoint(InputStream is)
Constructs a
RatioGaugeDataPoint from the specified stream
contents. |
RatioGaugeDataPoint(long lastUpdatedTimeStamp,
long msSpanned,
double numerator,
double denominator)
Constructs a
RatioGaugeDataPoint using the specified values. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object toCompare) |
double |
getDenominator()
Gets the ratio gauge denominator.
|
int |
getExpectedFieldCount()
Gets the expected CSV field count for the data type.
|
double |
getNumerator()
Gets the ratio gauge numerator.
|
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 |
setDenominator(double toSet)
Sets the ratio gauge denominator.
|
void |
setNumerator(double toSet)
Sets the ratio gauge numerator.
|
String |
toDebugString()
Gets a detailed representation of this object to facilitate debugging.
|
String |
toString() |
getLastUpdatedTimeStamp, getMsSpanned, read, setLastUpdatedTimeStamp, setMsSpanned, writepublic RatioGaugeDataPoint(long lastUpdatedTimeStamp,
long msSpanned,
double numerator,
double denominator)
RatioGaugeDataPoint using the specified values.lastUpdatedTimeStamp - last updated time stampmsSpanned - milliseconds spannednumerator - ratio's numerator valuedenominator - ratio's denominator valuepublic RatioGaugeDataPoint(InputStream is) throws DataFormatException, IOException
RatioGaugeDataPoint 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 double getDenominator()
public double getNumerator()
public int getExpectedFieldCount()
DataPointgetExpectedFieldCount in class DataPointprotected String[] prepareArrayFieldsForWriting(String[] fields)
DataPointString array with values to be written for
this DataPoint.prepareArrayFieldsForWriting in class DataPointfields - a String array that will be set with the field
values, in order, to be writtenpublic void set(String[] fields) throws DataFormatException
DataPointDataPoint contents from the specified String
array.set in class DataPointfields - String array to read fromDataFormatException - if the expected file content cannot be readpublic void setDenominator(double toSet)
toSet - ratio gauge denominatorpublic void setNumerator(double toSet)
toSet - ratio gauge numeratorpublic String toDebugString()
DataPointtoDebugString in class DataPointCopyright © 2014. All Rights Reserved.