Package gg.xp.xivsupport.groovy
Record Class GroovyScriptResult
java.lang.Object
java.lang.Record
gg.xp.xivsupport.groovy.GroovyScriptResult
public record GroovyScriptResult(@Nullable Object result, @Nullable Throwable failure, boolean success, DisplayControl displayControl)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGroovyScriptResult(@Nullable Object result, @Nullable Throwable failure, boolean success, DisplayControl displayControl) Creates an instance of aGroovyScriptResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayControlrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Throwablefailure()Returns the value of thefailurerecord component.static GroovyScriptResultfailure(DisplayControl dc, @Nullable Throwable failure) final inthashCode()Returns a hash code value for this object.@Nullable Objectresult()Returns the value of theresultrecord component.booleansuccess()Returns the value of thesuccessrecord component.static GroovyScriptResultsuccess(DisplayControl dc, @Nullable Object value) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroovyScriptResult
public GroovyScriptResult(@Nullable @Nullable Object result, @Nullable @Nullable Throwable failure, boolean success, DisplayControl displayControl) Creates an instance of aGroovyScriptResultrecord class.- Parameters:
result- the value for theresultrecord componentfailure- the value for thefailurerecord componentsuccess- the value for thesuccessrecord componentdisplayControl- the value for thedisplayControlrecord component
-
-
Method Details
-
success
-
failure
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
displayControl
Returns the value of thedisplayControlrecord component.- Returns:
- the value of the
displayControlrecord component
-