@Override public Integer getMajorVersionValue() { String major = getMajorVersion(); if (major.contains(".")) { String[] split = major.split("\\."); return Integer.parseInt(split[0]) * 10 + Integer.parseInt(split[1]); } else { return Integer.parseInt(major) * 10; } }
@Override public boolean matches(String major, String minor, String point) { return Objects.equals(getMajorVersion(), major) && Objects.equals(getMinorVersion(), minor) && Objects.equals(getPointVersion(), point); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof KyloVersion)) { return false; } KyloVersion that = (KyloVersion) o; return Objects.equals(this.getMajorVersion(), that.getMajorVersion()) && Objects.equals(this.getMinorVersion(), that.getMinorVersion()) && Objects.equals(this.getPointVersion(), that.getPointVersion()) && Objects.equals(this.getTag(), that.getTag()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof KyloVersion)) { return false; } KyloVersion that = (KyloVersion) o; return Objects.equals(this.getMajorVersion(), that.getMajorVersion()) && Objects.equals(this.getMinorVersion(), that.getMinorVersion()) && Objects.equals(this.getPointVersion(), that.getPointVersion()) && Objects.equals(this.getTag(), that.getTag()); }
@Override public boolean matches(String major, String minor, String point) { return Objects.equals(getMajorVersion(), major) && Objects.equals(getMinorVersion(), minor) && Objects.equals(getPointVersion(), point); }
@Override public KyloVersion withoutTag() { return new Version(this.getMajorVersion(), this.getMinorVersion(), this.getPointVersion(), null); }
@Override public String toString() { return getMajorVersion() + "." + getMinorVersion() + (Strings.isNullOrEmpty(getPointVersion()) ? "" : "." + getPointVersion()) + (Strings.isNullOrEmpty(getTag()) ? "" : "-" + getTag()); }
@Override public Integer getMajorVersionValue() { String major = getMajorVersion(); if (major.contains(".")) { String[] split = major.split("\\."); return Integer.parseInt(split[0]) * 10 + Integer.parseInt(split[1]); } else { return Integer.parseInt(major) * 10; } }
@Override public KyloVersion withoutTag() { return new Version(this.getMajorVersion(), this.getMinorVersion(), this.getPointVersion(), null); }
@Override public String toString() { return getMajorVersion() + "." + getMinorVersion() + (Strings.isNullOrEmpty(getPointVersion()) ? "" : "." + getPointVersion()) + (Strings.isNullOrEmpty(getTag()) ? "" : "-" + getTag()); }