Interface State

All Superinterfaces:
Type
All Known Implementing Classes:
DateTimeType, DecimalType, HSBType, OnOffType, OpenClosedType, PercentType, PlayPauseType, PointType, QuantityType, RawType, RewindFastforwardType, StringListType, StringType, UnDefType, UpDownType

@NonNullByDefault public interface State extends Type
This is a marker interface for all state types.
Author:
Kai Kreuzer - Initial contribution
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T extends @Nullable State>
    @Nullable T
    as(@Nullable Class<T> target)
    Convert this State's value into another type

    Methods inherited from interface org.openhab.core.types.Type

    format, toFullString
  • Method Details

    • as

      default <T extends @Nullable State> @Nullable T as(@Nullable Class<T> target)
      Convert this State's value into another type
      Parameters:
      target - the desired State type
      Returns:
      the State's value in the given type's representation, or null if the conversion was not possible