leitstand-inventory-api/src/main/java/io/leitstand/inventory/service/Version.java
@Override
	public int compareTo(Version version){
		int d = majorLevel - version.majorLevel;
		if(d != 0){
			return d;
		}
		d = minorLevel - version.minorLevel;
		if(d != 0){
			return d;
		}
		d = patchLevel - version.patchLevel;
		if(d != 0) {
			return d;
		}
		if(preRelease == null) {
			if(version.getPreRelease() == null) {
				return 0;
			}
			return 1;
		}
		if(version.getPreRelease() != null) {
			return preRelease.compareTo(version.getPreRelease());
		}
		return -1;
		
	}
/**
	 * Compares two versions by comparing the major, minor, patch and pre-release settings.
	 * @return -1, 0 or 1 depending on whether this version is lower, equal or higher than the specified version.
	 */
Compares two versions by comparing the major, minor, patch and pre-release settings.
@return -1, 0 or 1 depending on whether this version is lower, equal or higher than the specified version.
Compares two versions by comparing the major minor patch and pre - release settings . @return - 1 0 or 1 depending on whether this version is lower equal or higher than the specified version .
@Override
	public int compareTo(Version version){
		int d = majorLevel - version.majorLevel;
		if(d != 0){
			return d;
		}
		d = minorLevel - version.minorLevel;
		if(d != 0){
			return d;
		}
		d = patchLevel - version.patchLevel;
		if(d != 0) {
			return d;
		}
		if(preRelease == null) {
			if(version.getPreRelease() == null) {
				return 0;
			}
			return 1;
		}
		if(version.getPreRelease() != null) {
			return preRelease.compareTo(version.getPreRelease());
		}
		return -1;
	}
@ Override public int compareTo ( Version version ) { int d = majorLevel - version . majorLevel ; if ( d != 0 ) { return d ; } d = minorLevel - version . minorLevel ; if ( d != 0 ) { return d ; } d = patchLevel - version . patchLevel ; if ( d != 0 ) { return d ; } if ( preRelease == null ) { if ( version . getPreRelease ( ) == null ) { return 0 ; } return 1 ; } if ( version . getPreRelease ( ) != null ) { return preRelease . compareTo ( version . getPreRelease ( ) ) ; } return - 1 ; }
Compares two versions by comparing the major, minor, patch and pre-release settings.
Compares two versions by comparing the major minor patch and pre - release settings .