/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
(entry.map == null ? null : new Mapping(entry.map)));
}
- public boolean equals(DBRefEntry entry)
+ @Override
+ public boolean equals(Object o)
{
+ // TODO should also override hashCode to ensure equal objects have equal
+ // hashcodes
+ if (o == null || !(o instanceof DBRefEntry))
+ {
+ return false;
+ }
+ DBRefEntry entry = (DBRefEntry) o;
if (entry == this)
+ {
return true;
- if (entry == null)
- return false;
+ }
if (equalRef(entry)
&& ((map == null && entry.map == null) || (map != null
&& entry.map != null && map.equals(entry.map))))
return false;
}
if (entry == this)
+ {
return true;
+ }
if ((source != null && entry.source != null && source
.equalsIgnoreCase(entry.source))
&& (accessionId != null && entry.accessionId != null && accessionId
return ((source != null) ? source : "") + ":"
+ ((accessionId != null) ? accessionId : "");
}
+
+ public String toString()
+ {
+ return getSrcAccString();
+ }
}