Record Class AddonDependency
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.addon.AddonDependency
public record AddonDependency(@NotNull AddonId addon, @NotNull VersionRange versions, boolean optional)
extends Record
A registration-time dependency. The dependent addon's callback runs after
addon()'s.
A required dependency must be present in a version within versions(); an optional one
only orders registration when present.-
Constructor Summary
ConstructorsConstructorDescriptionAddonDependency(@NotNull AddonId addon, @NotNull VersionRange versions, boolean optional) Creates an instance of aAddonDependencyrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull AddonIdaddon()Returns the value of theaddonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanoptional()Returns the value of theoptionalrecord component.final StringtoString()Returns a string representation of this record class.@NotNull VersionRangeversions()Returns the value of theversionsrecord component.
-
Constructor Details
-
AddonDependency
public AddonDependency(@NotNull @NotNull AddonId addon, @NotNull @NotNull VersionRange versions, boolean optional) Creates an instance of aAddonDependencyrecord class.- Parameters:
addon- the value for theaddonrecord componentversions- the value for theversionsrecord componentoptional- the value for theoptionalrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
addon
Returns the value of theaddonrecord component.- Returns:
- the value of the
addonrecord component
-
versions
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-
optional
public boolean optional()Returns the value of theoptionalrecord component.- Returns:
- the value of the
optionalrecord component
-