@Test public void testGetMaximum() { assertEquals(version("8.0.0"), version("8.0.0").getMaximumVersion()); assertEquals(version("8.9.0"), version("8.x.0").getMaximumVersion()); assertEquals(version("8.0.9"), version("8.0.x").getMaximumVersion()); assertEquals(version("8.9.9"), version("8.x.x").getMaximumVersion()); }
@Override public TeiidVersion getMaximumVersion() { if (! this.hasWildCards()) return this; String major = getMajor().equals(WILDCARD) ? NINE : getMajor(); String minor = getMinor().equals(WILDCARD) ? NINE : getMinor(); String micro = getMicro().equals(WILDCARD) ? NINE : getMicro(); return new DefaultTeiidVersion(major, minor, micro); }
DefaultTeiidVersion implements TeiidVersion { @Override public TeiidVersion getMaximumVersion() { if (! this.hasWildCards()) return this; String major = getMajor().equals(WILDCARD) ? NINE : getMajor(); String minor = getMinor().equals(WILDCARD) ? NINE : getMinor(); String micro = getMicro().equals(WILDCARD) ? NINE : getMicro(); return new DefaultTeiidVersion(major, minor, micro); } }
DefaultTeiidVersion implements TeiidVersion { @Override public TeiidVersion getMaximumVersion() { if (! this.hasWildCards()) return this; String major = getMajor().equals(WILDCARD) ? NINE : getMajor(); String minor = getMinor().equals(WILDCARD) ? NINE : getMinor(); String micro = getMicro().equals(WILDCARD) ? NINE : getMicro(); return new DefaultTeiidVersion(major, minor, micro); } DefaultTeiidVersion(String major, String minor, String micro);  DefaultTeiidVersion(String versionString); }
DefaultTeiidVersion implements TeiidVersion { @Override public TeiidVersion getMaximumVersion() { if (! this.hasWildCards()) return this; String major = getMajor().equals(WILDCARD) ? NINE : getMajor(); String minor = getMinor().equals(WILDCARD) ? NINE : getMinor(); String micro = getMicro().equals(WILDCARD) ? NINE : getMicro(); return new DefaultTeiidVersion(major, minor, micro); } DefaultTeiidVersion(String major, String minor, String micro);  DefaultTeiidVersion(String versionString); @Override String toString(); @Override String getMajor(); @Override String getMinor(); @Override String getMicro(); @Override boolean hasWildCards(); @Override int hashCode(); @Override boolean equals(Object obj); @Override boolean compareTo(TeiidVersion otherVersion); @Override boolean isSevenInstance(); @Override TeiidVersion getMinimumVersion(); @Override TeiidVersion getMaximumVersion(); @Override boolean isGreaterThan(TeiidVersion otherVersion); @Override boolean isGreaterThan(Version otherVersion); @Override boolean isLessThan(TeiidVersion otherVersion); @Override boolean isLessThan(Version otherVersion); @Override boolean isGreaterThanOrEqualTo(TeiidVersion otherVersion); @Override boolean isGreaterThanOrEqualTo(Version otherVersion); @Override boolean isLessThanOrEqualTo(TeiidVersion otherVersion); @Override boolean isLessThanOrEqualTo(Version otherVersion); }
DefaultTeiidVersion implements TeiidVersion { @Override public TeiidVersion getMaximumVersion() { if (! this.hasWildCards()) return this; String major = getMajor().equals(WILDCARD) ? NINE : getMajor(); String minor = getMinor().equals(WILDCARD) ? NINE : getMinor(); String micro = getMicro().equals(WILDCARD) ? NINE : getMicro(); return new DefaultTeiidVersion(major, minor, micro); } DefaultTeiidVersion(String major, String minor, String micro);  DefaultTeiidVersion(String versionString); @Override String toString(); @Override String getMajor(); @Override String getMinor(); @Override String getMicro(); @Override boolean hasWildCards(); @Override int hashCode(); @Override boolean equals(Object obj); @Override boolean compareTo(TeiidVersion otherVersion); @Override boolean isSevenInstance(); @Override TeiidVersion getMinimumVersion(); @Override TeiidVersion getMaximumVersion(); @Override boolean isGreaterThan(TeiidVersion otherVersion); @Override boolean isGreaterThan(Version otherVersion); @Override boolean isLessThan(TeiidVersion otherVersion); @Override boolean isLessThan(Version otherVersion); @Override boolean isGreaterThanOrEqualTo(TeiidVersion otherVersion); @Override boolean isGreaterThanOrEqualTo(Version otherVersion); @Override boolean isLessThanOrEqualTo(TeiidVersion otherVersion); @Override boolean isLessThanOrEqualTo(Version otherVersion);  }