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
ConstructorDescriptionGroovyScriptResult
(@Nullable Object result, @Nullable Throwable failure, boolean success, DisplayControl displayControl) Creates an instance of aGroovyScriptResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayControl
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable Throwable
failure()
Returns the value of thefailure
record component.static GroovyScriptResult
failure
(DisplayControl dc, @Nullable Throwable failure) final int
hashCode()
Returns a hash code value for this object.@Nullable Object
result()
Returns the value of theresult
record component.boolean
success()
Returns the value of thesuccess
record component.static GroovyScriptResult
success
(DisplayControl dc, @Nullable Object value) final String
toString()
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 aGroovyScriptResult
record class.- Parameters:
result
- the value for theresult
record componentfailure
- the value for thefailure
record componentsuccess
- the value for thesuccess
record componentdisplayControl
- the value for thedisplayControl
record 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 theresult
record component.- Returns:
- the value of the
result
record component
-
failure
Returns the value of thefailure
record component.- Returns:
- the value of the
failure
record component
-
success
public boolean success()Returns the value of thesuccess
record component.- Returns:
- the value of the
success
record component
-
displayControl
Returns the value of thedisplayControl
record component.- Returns:
- the value of the
displayControl
record component
-