private static boolean versionMatches(AddOn addOn, AddOnDep dependency) {
        if (addOn.version.matches(dependency.getVersion())) {
            return true;
        }

        if (addOn.semVer != null && addOn.semVer.matches(dependency.getVersion())) {
            return true;
        }

        return false;
    }
private static boolean versionMatches ( AddOn addOn , AddOnDep dependency ) { if ( addOn . version . matches ( dependency . getVersion ( ) ) ) { return true ; } if ( addOn . semVer != null && addOn . semVer . matches ( dependency . getVersion ( ) ) ) { return true ; } return false ; }
Tells whether or not the given add-on version matches the one required by the dependency.
<p>
This methods is required to also check the {@code semVer} of the add-on, once removed it can match the version directly.

@param addOn the add-on to check
@param dependency the dependency
@return {@code true} if the version matches, {@code false} otherwise.