public boolean isEquivalentTo ( Semver version ) { // Get versions without build Semver sem1 = this . getBuild ( ) == null ? this : new Semver ( this . getValue ( ) . replace ( "+" + this . getBuild ( ) , "" ) ) ; Semver sem2 = version . getBuild ( ) == null ? version : new Semver ( version . getValue ( ) . replace ( "+" + version . getBuild ( ) , "" ) ) ; // Compare those new versions return sem1 . isEqualTo ( sem2 ) ; }
Checks if the version equals another version without taking the build into account .