Package com.monkey.ultimatebot.api.addon
Record Class AddonSnapshot
java.lang.Object
java.lang.Record
com.monkey.ultimatebot.api.addon.AddonSnapshot
public record AddonSnapshot(AddonDescriptor descriptor, AddonState state, Path jar, @Nullable String failure)
extends Record
Immutable status of one installed addon.
-
Constructor Summary
ConstructorsConstructorDescriptionAddonSnapshot(AddonDescriptor descriptor, AddonState state, Path jar, @Nullable String failure) Creates an instance of aAddonSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptorrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Stringfailure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.jar()Returns the value of thejarrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AddonSnapshot
public AddonSnapshot(AddonDescriptor descriptor, AddonState state, Path jar, @Nullable String failure) Creates an instance of aAddonSnapshotrecord class.- Parameters:
descriptor- the value for thedescriptorrecord componentstate- the value for thestaterecord componentjar- the value for thejarrecord componentfailure- the value for thefailurerecord 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). -
descriptor
Returns the value of thedescriptorrecord component.- Returns:
- the value of the
descriptorrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
jar
Returns the value of thejarrecord component.- Returns:
- the value of the
jarrecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-