Class PluginDependency


  • public final class PluginDependency
    extends java.lang.Object
    Represents a dependency on another plugin.
    • Constructor Summary

      Constructors 
      Constructor Description
      PluginDependency​(java.lang.String id, @Nullable java.lang.String version, boolean optional)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(@Nullable java.lang.Object o)  
      java.lang.String getId()
      Returns the plugin ID of this PluginDependency.
      java.util.Optional<java.lang.String> getVersion()
      Returns the version this PluginDependency should match.
      int hashCode()  
      boolean isOptional()
      Returns whether the dependency is optional for the plugin to work correctly.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PluginDependency

        public PluginDependency​(java.lang.String id,
                                @Nullable java.lang.String version,
                                boolean optional)
        Creates a new instance.
        Parameters:
        id - the plugin ID
        version - an optional version
        optional - whether or not this dependency is optional
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns the plugin ID of this PluginDependency.
        Returns:
        the plugin ID
      • getVersion

        public java.util.Optional<java.lang.String> getVersion()
        Returns the version this PluginDependency should match.
        Returns:
        an Optional with the plugin version, may be empty
      • isOptional

        public boolean isOptional()
        Returns whether the dependency is optional for the plugin to work correctly.
        Returns:
        true if dependency is optional
      • equals

        public boolean equals​(@Nullable java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object