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:
Serialized Form
  • Field Details

    • versionPattern

      public static final Pattern versionPattern
  • Constructor Details

    • Version

      public Version(int... version)
    • Version

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

      public Version(String version)
  • Method Details

    • equals

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

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

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

      public int compareTo(int... other)
    • isSmallerThan

      public boolean isSmallerThan(Version other)
    • isLargerThan

      public boolean isLargerThan(Version other)
    • isStable

      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

      public int getMajor()
    • getMinor

      public int getMinor()
    • getRevision

      public int getRevision()
    • toString

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

      public static int compare(String v1, String v2)