Package io.vertigo.commons.command
Record Class CommandResponse<P>
java.lang.Object
java.lang.Record
io.vertigo.commons.command.CommandResponse<P>
public record CommandResponse<P>(CommandResponseStatus status, String display, P payload, String targetUrl)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCommandResponse(CommandResponseStatus status, String display, P payload, String targetUrl) Creates an instance of aCommandResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <P> CommandResponseBuilder<P> builder()display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.payload()Returns the value of thepayloadrecord component.status()Returns the value of thestatusrecord component.Returns the value of thetargetUrlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommandResponse
Creates an instance of aCommandResponserecord class.- Parameters:
status- the value for thestatusrecord componentdisplay- the value for thedisplayrecord componentpayload- the value for thepayloadrecord componenttargetUrl- the value for thetargetUrlrecord component
-
-
Method Details
-
builder
-
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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
targetUrl
Returns the value of thetargetUrlrecord component.- Returns:
- the value of the
targetUrlrecord component
-