Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.model
Class VariableValue

    java.lang.Object
      org.teleal.cling.model.VariableValue

Direct Known Subclasses:
  ActionArgumentValue, StateVariableValue

    public class VariableValue

extends Object

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

Author:
  Christian Bauer

Constructor Summary
`VariableValue(Datatype datatype, Object value)` Creates and validates a variable value.

Method Summary
`Datatype` | `getDatatype()`
`Object` | `getValue()`
`protected boolean` | `isValidXMLString(String s)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VariableValue

    public 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 `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).

  Parameters:
    `datatype` - The type of the variable.
    `value` - The value of the variable.
  Throws:
    `InvalidValueException` - If the value is invalid for the given datatype, or if its string representation is invalid in XML.

Method Detail

### getDatatype

    public Datatype getDatatype()

### getValue

    public Object getValue()

### isValidXMLString

    protected boolean isValidXMLString(String s)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.