mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 11:33:11 +00:00
[DS-643] New testing framework (GSoC 2010)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5252 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1244,15 +1244,31 @@ public class Collection extends DSpaceObject
|
||||
* @return <code>true</code> if object passed in represents the same
|
||||
* collection as this object
|
||||
*/
|
||||
public boolean equals(Object other)
|
||||
{
|
||||
if (!(other instanceof Collection))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (getClass() != other.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
final Collection otherCollection = (Collection) other;
|
||||
if (this.getID() != otherCollection.getID()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int hash = 7;
|
||||
hash = 89 * hash + (this.collectionRow != null ? this.collectionRow.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
return (getID() == ((Collection) other).getID());
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for reading in a group from a group ID in a column. If the
|
||||
|
Reference in New Issue
Block a user