public static int compareVersionToRange ( Version version , Version minVersion , Version maxVersion ) { assert minVersion == null || maxVersion == null || minVersion . compareTo ( maxVersion ) < 0 ; if ( version == null ) { return Integer . MIN_VALUE ; } if ( minVersion != null && compareVersionsNoQualifier ( version , minVersion ) < 0 ) { return - 1 ; } if ( maxVersion != null && compareVersionsNoQualifier ( version , maxVersion ) >= 0 ) { return 1 ; } return 0 ; }
Null - safe compare a version number to a range of version numbers .