YAACC - UPNP Client and Server
|
Encapsulates a variable or argument value, validates and transforms it from/to a string representaion. More...
Public Member Functions | |
VariableValue (Datatype datatype, Object value) throws InvalidValueException | |
Creates and validates a variable value. | |
Datatype | getDatatype () |
Object | getValue () |
String | toString () |
Protected Member Functions | |
void | logInvalidXML (String s) |
Encapsulates a variable or argument value, validates and transforms it from/to a string representaion.
org.fourthline.cling.model.VariableValue.VariableValue | ( | Datatype | datatype, |
Object | value | ||
) | throws InvalidValueException |
Creates and validates a variable value.
If the given value is a String
, it will be converted with org.fourthline.cling.model.types.Datatype#valueOf(String)
. Any other value will be checked, whether it matches the datatype and if its string representation is valid in XML documents (unicode character test).
Note that for performance reasons, validation of a non-string value argument is skipped if executed on an Android runtime!
datatype | The type of the variable. |
value | The value of the variable. |
InvalidValueException | If the value is invalid for the given datatype, or if its string representation is invalid in XML. |