Package org.approvej.review
Record Class FileReviewerScript
java.lang.Object
java.lang.Record
org.approvej.review.FileReviewerScript
- Record Components:
script
- the script to be executed with placeholders"{receivedFile}"
and"{approvedFile}"
- All Implemented Interfaces:
Function<PathProvider,
,ReviewResult> FileReviewer
A
FileReviewer
implementation that executes the given script.-
Constructor Summary
ConstructorsConstructorDescriptionFileReviewerScript
(String script) Creates an instance of aFileReviewerScript
record class. -
Method Summary
Modifier and TypeMethodDescriptionapply
(PathProvider pathProvider) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.script()
Returns the value of thescript
record component.static FileReviewerScript
AFileReviewer
implementation that executes the given script.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FileReviewerScript
Creates an instance of aFileReviewerScript
record class.- Parameters:
script
- the value for thescript
record component
-
-
Method Details
-
script
AFileReviewer
implementation that executes the given script.- Parameters:
script
- the script to be executed with placeholders"{receivedFile}"
and"{approvedFile}"
- Returns:
- the new
FileReviewerScript
-
apply
- Specified by:
apply
in interfaceFunction<PathProvider,
ReviewResult>
-
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)
. -
script
Returns the value of thescript
record component.- Returns:
- the value of the
script
record component
-