Package org.approvej.approve
Record Class InplaceApprovalResult
java.lang.Object
java.lang.Record
org.approvej.approve.InplaceApprovalResult
- Record Components:
previouslyApproved- the value that was previously approvedreceived- the value that was received for approval
- All Implemented Interfaces:
ApprovalResult
public record InplaceApprovalResult(String previouslyApproved, String received)
extends Record
implements ApprovalResult
A simple
ApprovalResult, e.g. for an InplaceApprover.-
Constructor Summary
ConstructorsConstructorDescriptionInplaceApprovalResult(String previouslyApproved, String received) Creates an instance of aInplaceApprovalResultrecord class. -
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.Returns the value of thepreviouslyApprovedrecord component.received()Returns the value of thereceivedrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.approvej.ApprovalResult
needsApproval, throwIfNotApproved
-
Constructor Details
-
InplaceApprovalResult
Creates an instance of aInplaceApprovalResultrecord class.- Parameters:
previouslyApproved- the value for thepreviouslyApprovedrecord componentreceived- the value for thereceivedrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
previouslyApproved
Returns the value of thepreviouslyApprovedrecord component.- Specified by:
previouslyApprovedin interfaceApprovalResult- Returns:
- the value of the
previouslyApprovedrecord component
-
received
Returns the value of thereceivedrecord component.- Specified by:
receivedin interfaceApprovalResult- Returns:
- the value of the
receivedrecord component
-