java.lang.Object
io.spring.initializr.generator.version.Version
All Implemented Interfaces:
Serializable, Comparable<Version>

public final class Version extends Object implements Serializable, Comparable<Version>
Define a version. A typical version is represented as MAJOR.MINOR.PATCH[QUALIFIER] where the qualifier is optional and can have an extra version.

For example: 1.2.0.RC1 is the first release candidate of 1.2.0 and 1.5.0-M4 is the fourth milestone of 1.5.0. The special RELEASE qualifier indicates a final release (a.k.a. GA).

Two formats are currently supported, Version.Format.V1 that uses a dot to separate the qualifier from the version itself and Version.Format.V2 that is SemVer compliant (and therefore uses a dash to separate the qualifier).

The main purpose of parsing a version is to compare it with another version.

Author:
Stephane Nicoll
See Also: