Package org.apache.camel.util
Class PackageHelper
- java.lang.Object
-
- org.apache.camel.util.PackageHelper
-
public final class PackageHelper extends Object
Some helper methods for working with Java packages and versioning.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValidVersion(String packageName, double minimumVersion)
Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version.
-
-
-
Method Detail
-
isValidVersion
public static boolean isValidVersion(String packageName, double minimumVersion)
Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version. For package names which include multiple dots, dots after the leftmost are removed. So for example a spring version of 2.5.1 is converted to 2.51 so you can assert that it's >= 2.51 (so above 2.50 and less than 2.52 etc).- Parameters:
packageName
- the Java package name to compareminimumVersion
- the minimum version number- Returns:
- true if the package name can be determined and if it's greater than or equal to the minimum value
-
-