Package org.approvej.approve
Record Class InplaceApprovalResult
java.lang.Object
java.lang.Record
org.approvej.approve.InplaceApprovalResult
- Record Components:
received
- the value that was received for approvalpreviouslyApproved
- the value that was previously approved
- All Implemented Interfaces:
ApprovalResult
public record InplaceApprovalResult(String received, String previouslyApproved)
extends Record
implements ApprovalResult
A simple
ApprovalResult
, e.g. for an InplaceApprover
.-
Constructor Summary
ConstructorsConstructorDescriptionInplaceApprovalResult
(String received, String previouslyApproved) 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:
received
- the value for thereceived
record componentpreviouslyApproved
- the value for thepreviouslyApproved
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)
. -
received
Returns the value of thereceived
record component.- Specified by:
received
in interfaceApprovalResult
- Returns:
- the value of the
received
record component
-
previouslyApproved
Returns the value of thepreviouslyApproved
record component.- Specified by:
previouslyApproved
in interfaceApprovalResult
- Returns:
- the value of the
previouslyApproved
record component
-