refactor: delete version
This commit is contained in:
parent
e9d6f33930
commit
29e50966fd
1 changed files with 0 additions and 16 deletions
|
@ -1,16 +0,0 @@
|
|||
package xyz.ineanto.nicko.version;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public record Version(int major, int minor, int patch) implements Comparable<Version> {
|
||||
@Override
|
||||
public int compareTo(@NotNull Version otherVersion) {
|
||||
final Comparator<Version> comparator = Comparator
|
||||
.comparingInt(Version::major)
|
||||
.thenComparingInt(Version::minor)
|
||||
.thenComparingInt(Version::patch);
|
||||
return comparator.compare(this, otherVersion);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue