Record Class JsonText.JsonObjectResult.InvalidResult
java.lang.Object
java.lang.Record
org.diabetestechnology.drh.service.http.util.JsonText.JsonObjectResult.InvalidResult
- All Implemented Interfaces:
JsonText.JsonObjectResult
- Enclosing interface:
JsonText.JsonObjectResult
public static record JsonText.JsonObjectResult.InvalidResult(String originalText, List<Exception> exceptions)
extends Record
implements JsonText.JsonObjectResult
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.diabetestechnology.drh.service.http.util.JsonText.JsonObjectResult
JsonText.JsonObjectResult.InvalidResult, JsonText.JsonObjectResult.ValidResult<T>, JsonText.JsonObjectResult.ValidResultClassNotFound, JsonText.JsonObjectResult.ValidResultClassNotInstantiated, JsonText.JsonObjectResult.ValidUntypedResult
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidResult
(String originalText, List<Exception> exceptions) Creates an instance of aInvalidResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexceptions
record component.final int
hashCode()
Returns a hash code value for this object.boolean
isValid()
Returns the value of theoriginalText
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InvalidResult
Creates an instance of aInvalidResult
record class.- Parameters:
originalText
- the value for theoriginalText
record componentexceptions
- the value for theexceptions
record component
-
-
Method Details
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceJsonText.JsonObjectResult
-
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)
. -
originalText
Returns the value of theoriginalText
record component.- Specified by:
originalText
in interfaceJsonText.JsonObjectResult
- Returns:
- the value of the
originalText
record component
-
exceptions
Returns the value of theexceptions
record component.- Returns:
- the value of the
exceptions
record component
-