YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
org.fourthline.cling.model.VariableValue Class Reference

Encapsulates a variable or argument value, validates and transforms it from/to a string representaion. More...

Inheritance diagram for org.fourthline.cling.model.VariableValue:
Inheritance graph
Collaboration diagram for org.fourthline.cling.model.VariableValue:
Collaboration graph

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)
 

Detailed Description

Encapsulates a variable or argument value, validates and transforms it from/to a string representaion.

Author
Christian Bauer

Constructor & Destructor Documentation

◆ VariableValue()

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!

Parameters
datatypeThe type of the variable.
valueThe value of the variable.
Exceptions
InvalidValueExceptionIf the value is invalid for the given datatype, or if its string representation is invalid in XML.

The documentation for this class was generated from the following file: