/** * Checks if the given version string matches the constraint string. * * @param version the version string to check * @param constraint a constraint string to use in matching * * @return true if the version string matches the constraint */ public static boolean matches(String version, String constraint) { return compareHelper(version, constraint, COMPARE_EQUAL); }
/** * Checks if the given version string is less-than or equal-to the * constraint string. * * @param version the version string to check * @param constraint a constraint string to use in matching * * @return true if the version string is earlier than the constraint */ public static boolean isEarlier(String version, String constraint) { return compareHelper(version, constraint, COMPARE_LESS); }
/** * Checks if the given version string is greater-than or equal-to the * constraint string. * * @param version the version string to check * @param constraint a constraint string to use in matching * * @return true if the version string is later than the constraint */ public static boolean isLater(String version, String constraint) { return compareHelper(version, constraint, COMPARE_GREATER); }