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 aInstalledPluginrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepluginNamerecord component.Returns the value of thepluginVersionrecord component.org.json.simple.JSONObjecttoJson()Converts the implementing object to a JSON representation.toString()Returns a string representation of this record class.
-
Constructor Details
-
InstalledPlugin
Creates an instance of aInstalledPluginrecord class.- Parameters:
pluginName- the value for thepluginNamerecord componentpluginVersion- the value for thepluginVersionrecord componentenabled- the value for theenabledrecord 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:JsonSeriaizableConverts the implementing object to a JSON representation.- Specified by:
toJsonin 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 thepluginNamerecord component.- Returns:
- the value of the
pluginNamerecord component
-
pluginVersion
Returns the value of thepluginVersionrecord component.- Returns:
- the value of the
pluginVersionrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-