/** * Creates a version identifier from the specified components. * * @param major Major component of the version identifier. * @param minor Minor component of the version identifier. * @param micro Micro component of the version identifier. * @param qualifier Qualifier component of the version identifier. If <code>null</code> is specified, then the qualifier will be set to the empty string. * @param snapshot Indicates snapshot state of the version. * @throws IllegalArgumentException If the numerical components are negative or the qualifier string is invalid. */ public Version(int major, int minor, int micro, String qualifier, boolean snapshot) { if (qualifier == null) { qualifier = ""; } this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; this.snapshot = snapshot; validate(); }
this.qualifier = qualifier; this.snapshot = snapshot; validate();