Record Class HandlerContext.Result.Success<T>
java.lang.Object
java.lang.Record
dev.restate.sdk.endpoint.definition.HandlerContext.Result.Success<T>
- All Implemented Interfaces:
HandlerContext.Result<T>
- Enclosing interface:
HandlerContext.Result<T>
public static record HandlerContext.Result.Success<T>(T value)
extends Record
implements HandlerContext.Result<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface HandlerContext.Result
HandlerContext.Result.Failure<T>, HandlerContext.Result.Success<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Success
Creates an instance of aSuccessrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
getResultOrThrow
- Specified by:
getResultOrThrowin interfaceHandlerContext.Result<T>- Returns:
- the value, or throws the
TerminalExceptionof a failure.
-
toString
-
hashCode
-
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-