Class Version

java.lang.Object
ch.njol.skript.util.Version
All Implemented Interfaces:
Serializable, Comparable<Version>

public class Version extends Object implements Serializable, Comparable<Version>
See Also:
  • Field Details Link icon

    • versionPattern Link icon

      public static final Pattern versionPattern
  • Constructor Details Link icon

    • Version Link icon

      public Version(int... version)
    • Version Link icon

      public Version(int major, int minor, @Nullable @Nullable String postfix)
    • Version Link icon

      public Version(String version)
  • Method Details Link icon

    • equals Link icon

      public boolean equals(@Nullable @Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo Link icon

      public int compareTo(@Nullable @Nullable Version other)
      Specified by:
      compareTo in interface Comparable<Version>
    • compareTo Link icon

      public int compareTo(int... other)
      Parameters:
      other - An array containing the major, minor, and revision (ex: 1,19,3)
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
    • isSmallerThan Link icon

      public boolean isSmallerThan(Version other)
    • isLargerThan Link icon

      public boolean isLargerThan(Version other)
    • isStable Link icon

      public boolean isStable()
      Returns:
      Whether this is a stable version, i.e. a simple version number without any additional details (like alpha/beta/etc.)
    • getMajor Link icon

      public int getMajor()
    • getMinor Link icon

      public int getMinor()
    • getRevision Link icon

      public int getRevision()
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • compare Link icon

      public static int compare(String v1, String v2)