Package org.openhab.core.semantics
Record Class ItemSemanticsProblem
java.lang.Object
java.lang.Record
org.openhab.core.semantics.ItemSemanticsProblem
- Record Components:
item- item with problemsemanticType- item semantic typereason- description for the item semantics configuration problemexplanation- longer explanation of problemeditable- true if the item with the problem is a managed item, null if editable status is not checked
@NonNullByDefault
public record ItemSemanticsProblem(String item, @Nullable String semanticType, String reason, @Nullable String explanation, @Nullable Boolean editable)
extends Record
This is a representation of an item semantics configuration problem.
- Author:
- Mark Herwege - Persistence health API endpoint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Booleaneditable()Returns the value of theeditablerecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable StringReturns the value of theexplanationrecord component.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.reason()Returns the value of thereasonrecord component.@Nullable StringReturns the value of thesemanticTyperecord component.setEditable(boolean editable) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemSemanticsProblem
public ItemSemanticsProblem(String item, @Nullable String semanticType, String reason, @Nullable String explanation, @Nullable Boolean editable) Creates an instance of aItemSemanticsProblemrecord class.- Parameters:
item- the value for theitemrecord componentsemanticType- the value for thesemanticTyperecord componentreason- the value for thereasonrecord componentexplanation- the value for theexplanationrecord componenteditable- the value for theeditablerecord component
-
-
Method Details
-
setEditable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
semanticType
Returns the value of thesemanticTyperecord component.- Returns:
- the value of the
semanticTyperecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-
editable
Returns the value of theeditablerecord component.- Returns:
- the value of the
editablerecord component
-