Package org.yamcs.parameter
Class Value
- java.lang.Object
-
- org.yamcs.parameter.Value
-
- Direct Known Subclasses:
AggregateValue
,ArrayValue
,BinaryValue
,BooleanValue
,DoubleValue
,EnumeratedValue
,FloatValue
,SInt32Value
,SInt64Value
,StringValue
,TimestampValue
,UInt32Value
,UInt64Value
public abstract class Value extends Object
Union like class
-
-
Constructor Summary
Constructors Constructor Description Value()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description byte[]
getBinaryValue()
boolean
getBooleanValue()
double
getDoubleValue()
float
getFloatValue()
int
getSint32Value()
long
getSint64Value()
String
getStringValue()
long
getTimestampValue()
abstract org.yamcs.protobuf.Yamcs.Value.Type
getType()
int
getUint32Value()
long
getUint64Value()
double
toDouble()
return the value as a double.long
toLong()
-
-
-
Method Detail
-
getType
public abstract org.yamcs.protobuf.Yamcs.Value.Type getType()
-
getUint32Value
public int getUint32Value()
-
getSint32Value
public int getSint32Value()
-
getUint64Value
public long getUint64Value()
-
getSint64Value
public long getSint64Value()
-
getBinaryValue
public byte[] getBinaryValue()
-
getStringValue
public String getStringValue()
-
getFloatValue
public float getFloatValue()
-
getDoubleValue
public double getDoubleValue()
-
getBooleanValue
public boolean getBooleanValue()
-
getTimestampValue
public long getTimestampValue()
-
toLong
public long toLong()
- Returns:
- the value as signed long
- Throws:
UnsupportedOperationException
- if the value cannot be converted - for example if a double value is encountered or an unsigned 64 bits integer greater thanLong.MAX_VALUE
-
toDouble
public double toDouble()
return the value as a double. Precision will be lost when converting large integer numbers.- Throws:
UnsupportedOperationException
- for non numeric values.
-
-