@Test public void testVersionRangeToString() { Assert.assertEquals("1.8.3", new VersionRange(new Version(1, 8, 3)).toString()); Assert.assertEquals("[1.8.3, 1.8.4]", new VersionRange(new Version(1, 8, 3), new Version(1, 8, 4), true).toString()); Assert.assertEquals("[1.8.3, 1.8.4)", new VersionRange(new Version(1, 8, 3), new Version(1, 8, 4), false).toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder().append(major).append(VERSION_SECTION_SEPARATOR).append(minor) .append(VERSION_SECTION_SEPARATOR).append(micro); if (!qualifier.isEmpty()) { builder.append(VERSION_SECTION_SEPARATOR).append(qualifier); } return builder.toString(); }
Version implements Comparable<Version> { @Override public String toString() { StringBuilder builder = new StringBuilder().append(major).append(VERSION_SECTION_SEPARATOR).append(minor) .append(VERSION_SECTION_SEPARATOR).append(micro); if (!qualifier.isEmpty()) { builder.append(VERSION_SECTION_SEPARATOR).append(qualifier); } return builder.toString(); } }
Version implements Comparable<Version> { @Override public String toString() { StringBuilder builder = new StringBuilder().append(major).append(VERSION_SECTION_SEPARATOR).append(minor) .append(VERSION_SECTION_SEPARATOR).append(micro); if (!qualifier.isEmpty()) { builder.append(VERSION_SECTION_SEPARATOR).append(qualifier); } return builder.toString(); } Version(int major, int minor, int micro, String qualifier);  Version(int major, int minor, int micro); }
Version implements Comparable<Version> { @Override public String toString() { StringBuilder builder = new StringBuilder().append(major).append(VERSION_SECTION_SEPARATOR).append(minor) .append(VERSION_SECTION_SEPARATOR).append(micro); if (!qualifier.isEmpty()) { builder.append(VERSION_SECTION_SEPARATOR).append(qualifier); } return builder.toString(); } Version(int major, int minor, int micro, String qualifier);  Version(int major, int minor, int micro); static boolean isLegalSyntax(String candidate); static Version parseVersionIncludeNull(String version); static Version parseVersion(String version); int getMajor(); int getMinor(); int getMicro(); String getQualifier(); boolean lessThan(Version other); boolean lessThanOrEqual(Version other); boolean greaterThan(Version other); boolean greaterThanOrEqual(Version other); Version incrementMajor(); Version incrementMinor(); Version incrementMicro(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(Version o); @Override String toString(); }
Version implements Comparable<Version> { @Override public String toString() { StringBuilder builder = new StringBuilder().append(major).append(VERSION_SECTION_SEPARATOR).append(minor) .append(VERSION_SECTION_SEPARATOR).append(micro); if (!qualifier.isEmpty()) { builder.append(VERSION_SECTION_SEPARATOR).append(qualifier); } return builder.toString(); } Version(int major, int minor, int micro, String qualifier);  Version(int major, int minor, int micro); static boolean isLegalSyntax(String candidate); static Version parseVersionIncludeNull(String version); static Version parseVersion(String version); int getMajor(); int getMinor(); int getMicro(); String getQualifier(); boolean lessThan(Version other); boolean lessThanOrEqual(Version other); boolean greaterThan(Version other); boolean greaterThanOrEqual(Version other); Version incrementMajor(); Version incrementMinor(); Version incrementMicro(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(Version o); @Override String toString(); static final char VERSION_SECTION_SEPARATOR; static final String QUALIFIER_REGEX; static final Pattern VERSION_PATTERN; static final int REGEX_GROUP_NUMBER_MAJOR; static final int REGEX_GROUP_NUMBER_MINOR; static final int REGEX_GROUP_NUMBER_MICRO; static final int REGEX_GROUP_NUMBER_QUALIFIER; static final Pattern QUALIFIER_PATTERN; static final String VERSION_FORMAT_DESCRIPTION; }