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 aInplaceApprovalResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepreviouslyApproved
record component.received()
Returns the value of thereceived
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.approvej.ApprovalResult
needsApproval, throwIfNotApproved
-
Constructor Details
-
InplaceApprovalResult
Creates an instance of aInplaceApprovalResult
record class.- Parameters:
previouslyApproved
- the value for thepreviouslyApproved
record componentreceived
- the value for thereceived
record 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 thepreviouslyApproved
record component.- Specified by:
previouslyApproved
in interfaceApprovalResult
- Returns:
- the value of the
previouslyApproved
record component
-
received
Returns the value of thereceived
record component.- Specified by:
received
in interfaceApprovalResult
- Returns:
- the value of the
received
record component
-