| Modifier and Type | Method and Description |
|---|---|
static String |
formatValueAndSeverity(IValue value)
Formats the severity and status of the value.
|
static double |
getDouble(IValue value)
Try to get a double number from the Value.
|
static double |
getDouble(IValue value,
int index)
Try to get a double-typed array element from the Value.
|
static double[] |
getDoubleArray(IValue value)
Try to get a double-typed array from the Value.
|
static String |
getInfo(IValue value)
Try to get an info string from the Value.
|
static int |
getSize(IValue value)
Measures the size of the data in number of elements.
|
static String |
getString(IValue value)
Converts the given value into a string representation.
|
public static int getSize(IValue value)
value - the value, which provides the data that is measured1 for scalarspublic static double getDouble(IValue value)
Some applications only deal with numeric data, so they want to interpret integer, enum and double values all the same.
value - The value to decode.Double.NaN in case the value type does not decode into a number, or
Double.NEGATIVE_INFINITY if the value's severity indicates that there happens to be no
useful value.public static double getDouble(IValue value, int index)
value - The value to decode.index - The array index, 0 ... getSize()-1.Double.NaN in case the value type does not decode into a number, or
Double.NEGATIVE_INFINITY if the value's severity indicates that there happens to be no
useful value.getSize(IValue),
getDouble(IValue)public static double[] getDoubleArray(IValue value)
value - The value to decode.getSize(IValue),
getDouble(IValue)public static String getInfo(IValue value)
For numeric values, which is probably the vast majority of all values, this is the severity and status information.
For 'enum' type values, getDouble() will return the numeric value, and getInfo()
returns the associated enumeration string, appended to a possible severity/status text.
For string type values, this is the string value and a possible severity/status text, while
getDouble() will return NaN.
value - The value to decode.null.public static String formatValueAndSeverity(IValue value)
value - the value which provides the severity and statusnull String for the value and its severity/status. Does not include the time stamp.public static String getString(IValue value)
IValue.format() method is called and its result
returned.value - the value.Copyright © 2023 European Spallation Source. All rights reserved.