org.fourthline.cling.model.meta

## Class StateVariableTypeDetails

- java.lang.Object
- - org.fourthline.cling.model.meta.StateVariableTypeDetails

- All Implemented Interfaces:
    Validatable

      public class StateVariableTypeDetails
      extends Object
      implements Validatable

  Type of a state variable, its default value, and integrity rules for allowed values and ranges.
  Author:
    Christian Bauer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateVariableTypeDetails(Datatype datatype)`
    `StateVariableTypeDetails(Datatype datatype, String defaultValue)`
    `StateVariableTypeDetails(Datatype datatype, String defaultValue, String[] allowedValues, StateVariableAllowedValueRange allowedValueRange)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `foundDefaultInAllowedValues(String defaultValue, String[] allowedValues)`
    `StateVariableAllowedValueRange` | `getAllowedValueRange()`
    `String[]` | `getAllowedValues()`
    `Datatype` | `getDatatype()`
    `String` | `getDefaultValue()`
    `List<ValidationError>` | `validate()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StateVariableTypeDetails

          public StateVariableTypeDetails(Datatype datatype)

    - #### StateVariableTypeDetails

          public StateVariableTypeDetails(Datatype datatype,
                                          String defaultValue)

    - #### StateVariableTypeDetails

          public StateVariableTypeDetails(Datatype datatype,
                                          String defaultValue,
                                          String[] allowedValues,
                                          StateVariableAllowedValueRange allowedValueRange)

  - ### Method Detail

    - #### getDatatype

          public Datatype getDatatype()

    - #### getDefaultValue

          public String getDefaultValue()

    - #### getAllowedValues

          public String[] getAllowedValues()

    - #### getAllowedValueRange

          public StateVariableAllowedValueRange getAllowedValueRange()

    - #### foundDefaultInAllowedValues

          protected boolean foundDefaultInAllowedValues(String defaultValue,
                                                        String[] allowedValues)

    - #### validate

          public List<ValidationError> validate()

      Specified by:
        `validate` in interface `Validatable`
      Returns:
        An empty `List` if all rules validated properly, otherwise, the detected errors.

Copyright © 2015 4th Line GmbH, Switzerland. All rights reserved.