# Enum TraitValueKind

java.lang.Object
java.lang.Enum<TraitValueKind>
com.codename1.home.TraitValueKind

All Implemented Interfaces:
  `Comparable<TraitValueKind>`

public enum TraitValueKind extends Enum<TraitValueKind>

What sort of value a `Trait` carries, and therefore which `TraitValue` getter is the one that works.

##### There is deliberately no TLV

HomeKit characteristics can carry TLV8 blobs, which is how accessory vendors ship extensions outside the published characteristic set. Those have no portable meaning -- decoding one requires the vendor's own schema, and there is nothing on the Matter side to map them to. Exposing a byte array here would look like a capability and be an invitation to write iOS-only code inside a cross-platform API. A trait whose platform value is TLV8 is simply not in the `Trait` table.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BOOLEAN`
  True or false.
  `DOUBLE`
  A measured quantity with a `TraitUnit`.
  `ENUM`
  One of a fixed set, carried as an ordinal into one of this package's domain enums -- `LockState`, `HeatingCoolingMode`, `AirQualityLevel` and the rest.
  `INT`
  A whole number with no unit.
  `STRING`
  Free text.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static TraitValueKind`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static TraitValueKind[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### BOOLEAN

    public static final TraitValueKind BOOLEAN
    True or false. Read with `TraitValue.getBoolean()`.

  - ### INT

    public static final TraitValueKind INT
    A whole number with no unit. Read with `TraitValue.getInt()`.

  - ### DOUBLE

    public static final TraitValueKind DOUBLE
    A measured quantity with a `TraitUnit`. Read with `TraitValue.getDouble(TraitUnit)`, which makes you name the unit you expect.

  - ### STRING

    public static final TraitValueKind STRING
    Free text. Read with `TraitValue.getString()`.

  - ### ENUM

    public static final TraitValueKind ENUM
    One of a fixed set, carried as an ordinal into one of this package's domain enums -- `LockState`, `HeatingCoolingMode`, `AirQualityLevel` and the rest. Read it through that enum's own lookup rather than through `TraitValue.getEnumOrdinal()`, which exists for the codec.

- ## Method Details

  - ### values

    public static TraitValueKind[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static TraitValueKind valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null