public abstract class Value extends Object implements IValue
IValue interface.IValue.Format| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FORMAT_VALUE_COUNT
The max count of values to be formatted into string.
|
| Constructor and Description |
|---|
Value(ITimestamp time,
ISeverity severity,
String status,
IMetaData metaData)
Constructs a new Value from pieces.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
format()
Format the value via the Default format.
|
abstract String |
format(IValue.Format how,
int precision)
Format the value as a string.
|
protected char |
getDisplayChar(char c)
Convert char into printable character for Format.String.
|
IMetaData |
getMetaData()
Meta Data that helps with using the value, mostly for formatting.
|
ISeverity |
getSeverity()
Get the severity info.
|
String |
getStatus()
Get the status text that might describe the severity.
|
ITimestamp |
getTime()
Get the time stamp.
|
int |
hashCode() |
String |
toString() |
public static final int MAX_FORMAT_VALUE_COUNT
public Value(ITimestamp time, ISeverity severity, String status, IMetaData metaData)
time - the timestamp of the valueseverity - the severity of the valuestatus - the status of the valuemetaData - the meta data describing the PVpublic final ITimestamp getTime()
IValuepublic final ISeverity getSeverity()
IValuegetSeverity in interface IValueISeverity,
IValue.getStatus()public final String getStatus()
IValuegetStatus in interface IValueIValue.getSeverity()public IMetaData getMetaData()
IValue
It might be OK for some value types to only have null MetaData, while others might require a
specific one like NumericMetaData.
getMetaData in interface IValuepublic abstract String format(IValue.Format how, int precision)
IValueThis means only the numeric or string value. Not the timestamp, not the severity and status.
format in interface IValuehow - Detail on how to format.precision - Might be used by some format types to select for example the number of digits after the decimal
point. A precision of '-1' might select the default-precision obtained from the MetaData.public final String format()
IValueformat in interface IValueIValue.format(Format, int)protected char getDisplayChar(char c)
c - Char, 0 for end-of-stringCopyright © 2023 European Spallation Source. All rights reserved.