public <T extends TypeAndClassifier> SimpleTypeAndClassifier( TypeAndClassifier typeAndClassifier ) { this.type = typeAndClassifier.getType(); this.classifier = typeAndClassifier.getClassifier(); }
@Override public String getClassifier() { return tc.getClassifier(); }
@Override public String getType() { return tc.getType(); }
@Override public String getClassifier() { return tc.getClassifier(); }
@Override public String getType() { return tc.getType(); }
private SimpleTypeAndClassifier getSimpleTypeAndClassifier( final TypeAndClassifier tc ) { if ( tc instanceof SimpleTypeAndClassifier ) { return ( SimpleTypeAndClassifier ) tc; } else { return new SimpleTypeAndClassifier( tc.getType(), tc.getClassifier() ); } }
@Override public String getClassifier() { return tc.getClassifier(); }
@Override public String getType() { return tc.getType(); }
@Override public SimpleArtifactRef newRef( final String groupId, final String artifactId, final SingleVersion version ) { return new SimpleArtifactRef( groupId, artifactId, version, tc.getType(), tc.getClassifier() ); }
if ( classifier == null ) if ( other.getClassifier() != null ) else if ( !classifier.equals( other.getClassifier() ) ) if ( other.getType() != null ) else if ( !type.equals( other.getType() ) )
@Override public ArtifactRef asArtifactRef( final TypeAndClassifier tc ) { NeoTypeAndClassifier ntc = ( tc instanceof NeoTypeAndClassifier ) ? (NeoTypeAndClassifier) tc : new NeoTypeAndClassifier( tc.getType(), tc.getClassifier() ); return new NeoArtifactRef( this, ntc ); }
public boolean matches( final TypeAndClassifier tc ) { final String t = getType(); final String c = getClassifier(); final boolean typeMatch = WILDCARD.equals( t ) || t.equals( tc.getType() ); final boolean clsMatch = WILDCARD.equals( c ) || c.equals( tc.getClassifier() ); return typeMatch && clsMatch; }
public boolean matches( final TypeAndClassifier tc ) { final String t = getType(); final String c = getClassifier(); final boolean typeMatch = WILDCARD.equals( t ) || t.equals( tc.getType() ); final boolean clsMatch = WILDCARD.equals( c ) || c.equals( tc.getClassifier() ); return typeMatch && clsMatch; }
if ( getClassifier() == null ) if ( other.getClassifier() != null ) else if ( !getClassifier().equals( other.getClassifier() ) ) if ( other.getType() != null ) else if ( !getType().equals( other.getType() ) )