public class EnumeratedValue extends Value implements IEnumeratedValue
IEnumeratedValue.IEnumeratedValueIValue.FormatMAX_FORMAT_VALUE_COUNT| Constructor and Description |
|---|
EnumeratedValue(ITimestamp time,
ISeverity severity,
String status,
IEnumeratedMetaData metaData,
int[] values)
Constructs a new value from pieces.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
format(IValue.Format how,
int precision)
Format the value as a string.
|
IEnumeratedMetaData |
getMetaData()
Meta Data that helps with using the value, mostly for formatting.
|
int |
getValue() |
int[] |
getValues() |
int |
hashCode() |
format, getDisplayChar, getSeverity, getStatus, getTime, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitformat, getSeverity, getStatus, getTimepublic EnumeratedValue(ITimestamp time, ISeverity severity, String status, IEnumeratedMetaData metaData, int[] values)
time - the timestamp of the valueseverity - the severity of the valuestatus - the status of the valuemetaData - the meta info describing the PVvalues - the valuespublic final int[] getValues()
getValues in interface IEnumeratedValuepublic final int getValue()
getValue in interface IEnumeratedValueSince most values are probably scalars, this is a convenient way to get that one and only element.
IEnumeratedValue.getValues()public final 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 IValueformat in class Valuehow - 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 IEnumeratedMetaData 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 IEnumeratedValuegetMetaData in interface IValuegetMetaData in class ValueCopyright © 2023 European Spallation Source. All rights reserved.