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 Boolean
editable()
Returns the value of theeditable
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable String
Returns the value of theexplanation
record component.final int
hashCode()
Returns a hash code value for this object.item()
Returns the value of theitem
record component.reason()
Returns the value of thereason
record component.@Nullable String
Returns the value of thesemanticType
record component.setEditable
(boolean editable) final String
toString()
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 aItemSemanticsProblem
record class.- Parameters:
item
- the value for theitem
record componentsemanticType
- the value for thesemanticType
record componentreason
- the value for thereason
record componentexplanation
- the value for theexplanation
record componenteditable
- the value for theeditable
record 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 theitem
record component.- Returns:
- the value of the
item
record component
-
semanticType
Returns the value of thesemanticType
record component.- Returns:
- the value of the
semanticType
record component
-
reason
Returns the value of thereason
record component.- Returns:
- the value of the
reason
record component
-
explanation
Returns the value of theexplanation
record component.- Returns:
- the value of the
explanation
record component
-
editable
Returns the value of theeditable
record component.- Returns:
- the value of the
editable
record component
-