Record Class InstalledPlugin
java.lang.Object
java.lang.Record
com.zetaplugins.zetacore.debug.data.InstalledPlugin
- Record Components:
pluginName
- the name of the pluginpluginVersion
- the version of the plugin
- All Implemented Interfaces:
JsonSeriaizable
public record InstalledPlugin(String pluginName, String pluginVersion, boolean enabled)
extends Record
implements JsonSeriaizable
Represents an installed plugin with its name and version.
-
Constructor Summary
ConstructorsConstructorDescriptionInstalledPlugin
(String pluginName, String pluginVersion, boolean enabled) Creates an instance of aInstalledPlugin
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
enabled()
Returns the value of theenabled
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepluginName
record component.Returns the value of thepluginVersion
record component.org.json.simple.JSONObject
toJson()
Converts the implementing object to a JSON representation.toString()
Returns a string representation of this record class.
-
Constructor Details
-
InstalledPlugin
Creates an instance of aInstalledPlugin
record class.- Parameters:
pluginName
- the value for thepluginName
record componentpluginVersion
- the value for thepluginVersion
record componentenabled
- the value for theenabled
record 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. -
toJson
public org.json.simple.JSONObject toJson()Description copied from interface:JsonSeriaizable
Converts the implementing object to a JSON representation.- Specified by:
toJson
in interfaceJsonSeriaizable
- Returns:
- a JSONObject representing the object
-
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 '=='. -
pluginName
Returns the value of thepluginName
record component.- Returns:
- the value of the
pluginName
record component
-
pluginVersion
Returns the value of thepluginVersion
record component.- Returns:
- the value of the
pluginVersion
record component
-
enabled
public boolean enabled()Returns the value of theenabled
record component.- Returns:
- the value of the
enabled
record component
-