New helpers method for Version enum

This commit is contained in:
Nanit 2021-10-29 13:17:39 +03:00
parent f490e00888
commit 9659b4500a

View File

@ -64,6 +64,22 @@ public enum Version {
return prev;
}
public boolean more(Version another) {
return this.protocolNumber > another.protocolNumber;
}
public boolean moreOrEqual(Version another) {
return this.protocolNumber >= another.protocolNumber;
}
public boolean less(Version another) {
return this.protocolNumber < another.protocolNumber;
}
public boolean lessOrEqual(Version another) {
return this.protocolNumber <= another.protocolNumber;
}
public static Version getMin() {
return V1_9;
}