Package org.openhab.core.converter
Record Class SerializabilityResult<T>
java.lang.Object
java.lang.Record
org.openhab.core.converter.SerializabilityResult<T>
@NonNullByDefault
public record SerializabilityResult<T>(T uid, boolean ok, String failureReason)
extends Record
A container that holds the result of a serializability check.
- Author:
- Nadahar - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionSerializabilityResult(T uid, boolean ok, String failureReason) Creates an instance of aSerializabilityResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureReasonrecord component.final inthashCode()Returns a hash code value for this object.booleanok()Returns the value of theokrecord component.toString()Returns a string representation of this record class.uid()Returns the value of theuidrecord component.
-
Constructor Details
-
SerializabilityResult
Creates an instance of aSerializabilityResultrecord class.- Parameters:
uid- the value for theuidrecord componentok- the value for theokrecord componentfailureReason- the value for thefailureReasonrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
uid
Returns the value of theuidrecord component.- Returns:
- the value of the
uidrecord component
-
ok
public boolean ok()Returns the value of theokrecord component.- Returns:
- the value of the
okrecord component
-
failureReason
Returns the value of thefailureReasonrecord component.- Returns:
- the value of the
failureReasonrecord component
-