Check this
Version
against another for compliancy (compatibility).
If this
Version
is compatible with the specified one, then
true is returned, otherwise
false. Be careful when using this method since, in example, version 1.3.7 is compliant to version 1.3.6, while the opposite is not.
The following example displays the expected behaviour and results of version.
final Version v1 = new Version( 1, 3 , 6 ); final Version v2 = new Version( 1, 3 , 7 ); final Version v3 = new Version( 1, 4 , 0 ); final Version v4 = new Version( 2, 0 , 1 ); assert( v1.complies( v1 ) ); assert( ! v1.complies( v2 ) ); assert( v2.complies( v1 ) ); assert( ! v1.complies( v3 ) ); assert( v3.complies( v1 ) ); assert( ! v1.complies( v4 ) ); assert( ! v4.complies( v1 ) );
@param other The other
Version
object to be compared with thisfor compliancy (compatibility).
@return
true if this
Version
is compatible with the specified one