public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append( isLowerBoundInclusive() ? '[' : '(' ); if ( getLowerBound() != null ) { buf.append( getLowerBound().toString() ); } buf.append( ',' ); if ( getUpperBound() != null ) { buf.append( getUpperBound().toString() ); } buf.append( isUpperBoundInclusive() ? ']' : ')' ); return buf.toString(); } }
restriction = new Restriction( version, lowerBoundInclusive, version, upperBoundInclusive ); restriction = new Restriction( lowerVersion, lowerBoundInclusive, upperVersion, upperBoundInclusive );
public int getNature() { if ( artifact.getVersion() != null ) { return artifact.isSnapshot() ? SNAPSHOT : RELEASE; } VersionRange range = artifact.getVersionRange(); if ( range != null ) { for ( Restriction restriction : range.getRestrictions() ) { if ( isSnapshot( restriction.getLowerBound() ) || isSnapshot( restriction.getUpperBound() ) ) { return RELEASE_OR_SNAPSHOT; } } } return RELEASE; }
public String toString() { if ( recommendedVersion != null ) { return recommendedVersion.toString(); } else { StringBuilder buf = new StringBuilder(); for ( Iterator<Restriction> i = restrictions.iterator(); i.hasNext(); ) { Restriction r = i.next(); buf.append( r.toString() ); if ( i.hasNext() ) { buf.append( ',' ); } } return buf.toString(); } }
if ( lowerBound == null ) lowerBound = restriction.getLowerBound(); if ( restriction.getLowerBound() == null || restriction.getLowerBound().compareTo( upperBound ) < 0 ) upperBound = restriction.getUpperBound();
public String toString() { if ( recommendedVersion != null ) { return recommendedVersion.toString(); } else { StringBuilder buf = new StringBuilder(); for ( Iterator<Restriction> i = restrictions.iterator(); i.hasNext(); ) { Restriction r = i.next(); buf.append( r.toString() ); if ( i.hasNext() ) { buf.append( ',' ); } } return buf.toString(); } }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append( isLowerBoundInclusive() ? '[' : '(' ); if ( getLowerBound() != null ) { buf.append( getLowerBound().toString() ); } buf.append( ',' ); if ( getUpperBound() != null ) { buf.append( getUpperBound().toString() ); } buf.append( isUpperBoundInclusive() ? ']' : ')' ); return buf.toString(); } }
public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }
if ( lowerBound == null ) lowerBound = restriction.getLowerBound(); if ( restriction.getLowerBound() == null || restriction.getLowerBound().compareTo( upperBound ) < 0 ) upperBound = restriction.getUpperBound();
public String toString() { if ( recommendedVersion != null ) { return recommendedVersion.toString(); } else { StringBuilder buf = new StringBuilder(); for ( Iterator<Restriction> i = restrictions.iterator(); i.hasNext(); ) { Restriction r = i.next(); buf.append( r.toString() ); if ( i.hasNext() ) { buf.append( ',' ); } } return buf.toString(); } }
restriction = new Restriction( version, lowerBoundInclusive, version, upperBoundInclusive ); restriction = new Restriction( lowerVersion, lowerBoundInclusive, upperVersion, upperBoundInclusive );
if ( res1.getLowerBound() == null || res2.getUpperBound() == null || res1.getLowerBound().compareTo( res2.getUpperBound() ) <= 0 ) if ( res1.getUpperBound() == null || res2.getLowerBound() == null || res1.getUpperBound().compareTo( res2.getLowerBound() ) >= 0 ) if ( res1.getLowerBound() == null ) lower = res2.getLowerBound(); lowerInclusive = res2.isLowerBoundInclusive(); else if ( res2.getLowerBound() == null ) lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive(); int comparison = res1.getLowerBound().compareTo( res2.getLowerBound() ); if ( comparison < 0 ) lower = res2.getLowerBound(); lowerInclusive = res2.isLowerBoundInclusive(); lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive() && res2.isLowerBoundInclusive(); lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive(); if ( res1.getUpperBound() == null )
if ( recommendedVersion != null && r.containsVersion( recommendedVersion ) ) && r.containsVersion( restriction.getRecommendedVersion() ) )
if ( lowerBound == null ) lowerBound = restriction.getLowerBound(); if ( restriction.getLowerBound() == null || restriction.getLowerBound().compareTo( upperBound ) < 0 ) upperBound = restriction.getUpperBound();
restriction = new Restriction( version, lowerBoundInclusive, version, upperBoundInclusive ); restriction = new Restriction( lowerVersion, lowerBoundInclusive, upperVersion, upperBoundInclusive );
if ( res1.getLowerBound() == null || res2.getUpperBound() == null || res1.getLowerBound().compareTo( res2.getUpperBound() ) <= 0 ) if ( res1.getUpperBound() == null || res2.getLowerBound() == null || res1.getUpperBound().compareTo( res2.getLowerBound() ) >= 0 ) if ( res1.getLowerBound() == null ) lower = res2.getLowerBound(); lowerInclusive = res2.isLowerBoundInclusive(); else if ( res2.getLowerBound() == null ) lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive(); int comparison = res1.getLowerBound().compareTo( res2.getLowerBound() ); if ( comparison < 0 ) lower = res2.getLowerBound(); lowerInclusive = res2.isLowerBoundInclusive(); lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive() && res2.isLowerBoundInclusive(); lower = res1.getLowerBound(); lowerInclusive = res1.isLowerBoundInclusive(); if ( res1.getUpperBound() == null )
if ( recommendedVersion != null && r.containsVersion( recommendedVersion ) ) && r.containsVersion( restriction.getRecommendedVersion() ) )
public String toString() { StringBuilder buf = new StringBuilder(); buf.append( isLowerBoundInclusive() ? "[" : "(" ); if ( getLowerBound() != null ) { buf.append( getLowerBound().toString() ); } buf.append( "," ); if ( getUpperBound() != null ) { buf.append( getUpperBound().toString() ); } buf.append( isUpperBoundInclusive() ? "]" : ")" ); return buf.toString(); } }
public boolean containsVersion( ArtifactVersion version ) { for ( Restriction restriction : restrictions ) { if ( restriction.containsVersion( version ) ) { return true; } } return false; }