Class ThingStatusInfo

java.lang.Object
org.openhab.core.thing.ThingStatusInfo

@NonNullByDefault public class ThingStatusInfo extends Object
A ThingStatusInfo represents status information of a thing which consists of
  • the status itself
  • detail of the status
  • and a description of the status
Author:
Stefan Bußweiler - Initial contribution, Dennis Nobel - Added null checks
  • Constructor Details

    • ThingStatusInfo

      protected ThingStatusInfo()
      Default constructor for deserialization e.g. by Gson.
    • ThingStatusInfo

      public ThingStatusInfo(ThingStatus status, ThingStatusDetail statusDetail, @Nullable String description)
      Constructs a status info.
      Parameters:
      status - the status (must not be null)
      statusDetail - the detail of the status (must not be null)
      description - the description of the status
  • Method Details

    • getStatus

      public ThingStatus getStatus()
      Gets the status itself.
      Returns:
      the status (not null)
    • getStatusDetail

      public ThingStatusDetail getStatusDetail()
      Gets the detail of the status.
      Returns:
      the status detail (not null)
    • getDescription

      public @Nullable String getDescription()
      Gets the description of the status.
      Returns:
      the description
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object