int (@NotNull GitVersion o) { if (o.getType() == Type.NULL) { return (getType() == Type.NULL ? 0 : 1); } int d = myMajor - o.myMajor; if (d != 0) { return d; } d = myMinor - o.myMinor; if (d != 0) { return d; } d = myRevision - o.myRevision; if (d != 0) { return d; } return myPatchLevel - o.myPatchLevel; }