Class VersionRange
java.lang.Object
io.spring.initializr.generator.version.VersionRange
Define a
Version range. A square bracket "[" or "]" denotes an inclusive end of
the range and a round bracket "(" or ")" denotes an exclusive end of the range. A range
can also be unbounded by defining a a single Version. The examples below make
this clear.
- "[1.2.0.RELEASE,1.3.0.RELEASE)" version 1.2.0 and any version after this, up to, but not including, version 1.3.0.
- "(2.0.0,3.2.0]" any version after 2.0.0 up to and including version 3.2.0.
- "2.5.0-M1", the first milestone of 2.5.0 and any version after that.
- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsModifierConstructorDescriptionVersionRange(Version startingVersion) protectedVersionRange(Version lowerVersion, boolean lowerInclusive, Version higherVersion, boolean higherInclusive) -
Method Summary
Modifier and TypeMethodDescriptionbooleanformat(Version.Format format) Format this version range to the specifiedVersion.Format.inthashCode()booleanbooleanbooleanSpecify if theVersionmatches this range.toString()
-
Constructor Details
-
VersionRange
-
VersionRange
-
-
Method Details
-
match
Specify if theVersionmatches this range. Returnstrueif the version is contained within this range,falseotherwise.- Parameters:
version- the version to check- Returns:
trueif the version matches
-
format
Format this version range to the specifiedVersion.Format.- Parameters:
format- the version format to use- Returns:
- a version range whose boundaries are compliant with the specified format.
-
getLowerVersion
-
isLowerInclusive
public boolean isLowerInclusive() -
getHigherVersion
-
isHigherInclusive
public boolean isHigherInclusive() -
toRangeString
-
equals
-
hashCode
public int hashCode() -
toString
-