code: public static boolean containsVersion( VersionRange allowedRange, ArtifactVersion theVersion )
      {
          boolean matched = false;
          ArtifactVersion recommendedVersion = allowedRange.getRecommendedVersion();
          if ( recommendedVersion == null )
          {
              @SuppressWarnings( "unchecked" )
              List<Restriction> restrictions = allowedRange.getRestrictions();
              for ( Restriction restriction :  restrictions )
              {
                  if ( restriction.containsVersion( theVersion ) )
                  {
                      matched = true;
                      break;
                  }
              }
          }
          else
          {
              // only singular versions ever have a recommendedVersion
              @SuppressWarnings( "unchecked" )
              int compareTo = recommendedVersion.compareTo( theVersion );
              matched = ( compareTo <= 0 );
          }
          return matched;
      }
docs: 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.