Package org.openmuc.framework.data
Interface Value
-
- All Known Implementing Classes:
BooleanValue
,ByteArrayValue
,ByteValue
,DoubleValue
,FloatValue
,IntValue
,LongValue
,ShortValue
,StringValue
public interface Value
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
asBoolean()
Returns the value as a boolean.byte
asByte()
Returns the value as a byte.byte[]
asByteArray()
Returns the value as a byte array.double
asDouble()
Returns the value as a double.float
asFloat()
Returns the value as a float.int
asInt()
Returns the value as an integer.long
asLong()
Returns the value as a long.short
asShort()
Returns the value as a short.java.lang.String
asString()
Returns the value as a string.ValueType
getValueType()
Returns theValueType
-
-
-
Method Detail
-
asDouble
double asDouble()
Returns the value as a double.- Returns:
- the value as a double
- Throws:
TypeConversionException
- if the stored value cannot be converted to a double
-
asFloat
float asFloat()
Returns the value as a float.- Returns:
- the value as a float
- Throws:
TypeConversionException
- if the stored value cannot be converted to a float
-
asLong
long asLong()
Returns the value as a long.- Returns:
- the value as a long
- Throws:
TypeConversionException
- if the stored value cannot be converted to a long
-
asInt
int asInt()
Returns the value as an integer.- Returns:
- the value as an integer
- Throws:
TypeConversionException
- if the stored value cannot be converted to an integer
-
asShort
short asShort()
Returns the value as a short.- Returns:
- the value as a short
- Throws:
TypeConversionException
- if the stored value cannot be converted to a short
-
asByte
byte asByte()
Returns the value as a byte.- Returns:
- the value as a byte
- Throws:
TypeConversionException
- if the stored value cannot be converted to a byte
-
asBoolean
boolean asBoolean()
Returns the value as a boolean.- Returns:
- the value as a boolean
- Throws:
TypeConversionException
- if the stored value cannot be converted to a boolean
-
asByteArray
byte[] asByteArray()
Returns the value as a byte array.- Returns:
- the value as a byte array
-
asString
java.lang.String asString()
Returns the value as a string.- Returns:
- the value as a string
-
-