Record Class PluginDependency
java.lang.Object
java.lang.Record
org.spongepowered.plugin.metadata.model.PluginDependency
- Record Components:
id- Theidversion- Theversion, as a maven range.loadOrder- Theload orderoptional- Whether this dependency is optional
public record PluginDependency(String id, VersionRange version, PluginDependency.LoadOrder loadOrder, boolean optional)
extends Record
Specification for an entity considered to be a "dependency" for a
plugin metadata.
Consult the vendor for further information on how this is used.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the ordering of how dependencies are loaded versus others. -
Constructor Summary
ConstructorsConstructorDescriptionPluginDependency(String id, VersionRange version, PluginDependency.LoadOrder loadOrder, boolean optional) Creates an instance of aPluginDependencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theloadOrderrecord component.booleanoptional()Returns the value of theoptionalrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
PluginDependency
public PluginDependency(String id, VersionRange version, PluginDependency.LoadOrder loadOrder, boolean optional) Creates an instance of aPluginDependencyrecord class.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
loadOrder
Returns the value of theloadOrderrecord component.- Returns:
- the value of the
loadOrderrecord component
-
optional
public boolean optional()Returns the value of theoptionalrecord component.- Returns:
- the value of the
optionalrecord component
-