Adding codeSegment for object identity to Plugin class.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@425905 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2006-07-26 23:37:55 +00:00
parent e5a3682ec5
commit 45d97d04d3
1 changed files with 22 additions and 0 deletions

View File

@ -2356,6 +2356,28 @@
{
return groupId + ":" + artifactId;
}
public boolean equals( Object other )
{
if ( other instanceof Plugin )
{
Plugin otherPlugin = (Plugin) other;
return getKey().equals( otherPlugin.getKey() );
}
return false;
}
public int hashCode()
{
return getKey().hashCode();
}
public String toString()
{
return "Plugin [" + getKey() + "]";
}
]]></code>
</codeSegment>
</codeSegments>