Package ch.njol.skript.util
Class Version
java.lang.Object
ch.njol.skript.util.Version
- All Implemented Interfaces:
Serializable
,Comparable<Version>
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
int
compareTo
(int... other) int
boolean
int
getMajor()
int
getMinor()
int
int
hashCode()
boolean
isLargerThan
(Version other) boolean
isSmallerThan
(Version other) boolean
isStable()
toString()
-
Field Details
-
versionPattern
-
-
Constructor Details
-
Version
public Version(int... version) -
Version
-
Version
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Version>
-
compareTo
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
-
isLargerThan
-
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
-
compare
-