Package org.approvej.approve
Record Class FileApprovalResult
java.lang.Object
java.lang.Record
org.approvej.approve.FileApprovalResult
- Record Components:
received
- the received valuepreviouslyApproved
- the previously approved valuepathProvider
- thePathProvider
providing the paths to the received an approved files
- All Implemented Interfaces:
ApprovalResult
public record FileApprovalResult(String received, String previouslyApproved, PathProvider pathProvider)
extends Record
implements ApprovalResult
ApprovalResult
for files.-
Constructor Summary
ConstructorsConstructorDescriptionFileApprovalResult
(String received, String previouslyApproved, PathProvider pathProvider) Creates an instance of aFileApprovalResult
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 thepathProvider
record component.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
-
FileApprovalResult
Creates an instance of aFileApprovalResult
record class.- Parameters:
received
- the value for thereceived
record componentpreviouslyApproved
- the value for thepreviouslyApproved
record componentpathProvider
- the value for thepathProvider
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
-
pathProvider
Returns the value of thepathProvider
record component.- Returns:
- the value of the
pathProvider
record component
-