diff options
author | Brett Porter <brett@apache.org> | 2009-11-30 03:10:40 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-11-30 03:10:40 +0000 |
commit | d6c5ea064e90818d7a27ff00b68cf262371a8b74 (patch) | |
tree | a8b7752d133d895b5eebc91e32f6882eadd5b053 /archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api | |
parent | 0caebfc6b621579481aca223a76e24be0be9f0c3 (diff) | |
download | archiva-d6c5ea064e90818d7a27ff00b68cf262371a8b74.tar.gz archiva-d6c5ea064e90818d7a27ff00b68cf262371a8b74.zip |
[MRM-1288] migrate getDependees() to new API
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@885319 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api')
-rw-r--r-- | archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java index 7c1176cac..8ea155574 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java @@ -45,6 +45,55 @@ public class Artifact } + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + if ( o == null || getClass() != o.getClass() ) + { + return false; + } + + Artifact artifact = (Artifact) o; + + if ( !artifactId.equals( artifact.artifactId ) ) + { + return false; + } + if ( !groupId.equals( artifact.groupId ) ) + { + return false; + } + if ( !repositoryId.equals( artifact.repositoryId ) ) + { + return false; + } + if ( type != null ? !type.equals( artifact.type ) : artifact.type != null ) + { + return false; + } + if ( !version.equals( artifact.version ) ) + { + return false; + } + + return true; + } + + @Override + public int hashCode() + { + int result = repositoryId.hashCode(); + result = 31 * result + groupId.hashCode(); + result = 31 * result + artifactId.hashCode(); + result = 31 * result + version.hashCode(); + result = 31 * result + ( type != null ? type.hashCode() : 0 ); + return result; + } + public Artifact( String repositoryId, String groupId, String artifactId, String version, String type ) // String type, Date whenGathered ) { |