public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }
public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }
if ( recommendedVersion != null && r.containsVersion( recommendedVersion ) ) && r.containsVersion( restriction.getRecommendedVersion() ) )
if ( recommendedVersion != null && r.containsVersion( recommendedVersion ) ) && r.containsVersion( restriction.getRecommendedVersion() ) )
public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }
if ( r.containsVersion( version ) )
if ( r.containsVersion( version ) )
if ( recommendedVersion != null && r.containsVersion( recommendedVersion ) ) && r.containsVersion( restriction.getRecommendedVersion() ) )
/** * Copied from Artifact.VersionRange. This is tweaked to handle singular ranges properly. Currently the default * containsVersion method assumes a singular version means allow everything. This method assumes that "2.0.4" == * "[2.0.4,)" * * @param allowedRange range of allowed versions. * @param theVersion the version to be checked. * @return true if the version is contained by the range. */ public static boolean containsVersion( VersionRange allowedRange, ArtifactVersion theVersion ) { ArtifactVersion recommendedVersion = allowedRange.getRecommendedVersion(); if ( recommendedVersion == null ) { List<Restriction> restrictions = allowedRange.getRestrictions(); for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( theVersion ) ) { return true; } } } // only singular versions ever have a recommendedVersion return recommendedVersion.compareTo( theVersion ) <= 0; } }
for ( Restriction restriction : restrictions ) if ( restriction.containsVersion( theVersion ) )
for ( Restriction restriction : restrictions ) if ( restriction.containsVersion( theVersion ) )
for ( Restriction restriction : restrictions ) if ( restriction.containsVersion( v ) )