git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1233 tidy up and use same RNA helix colours in colour by annotation and RNA helix...
[jalview.git]
/
src
/
jalview
/
datamodel
/
DBRefEntry.java
diff --git
a/src/jalview/datamodel/DBRefEntry.java
b/src/jalview/datamodel/DBRefEntry.java
index
bc1d610
..
0581845
100755
(executable)
--- a/
src/jalview/datamodel/DBRefEntry.java
+++ b/
src/jalview/datamodel/DBRefEntry.java
@@
-69,12
+69,20
@@
public class DBRefEntry
(entry.map == null ? null : new Mapping(entry.map)));
}
(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)
if (entry == this)
+ {
return true;
return true;
- if (entry == null)
- return false;
+ }
if (equalRef(entry)
&& ((map == null && entry.map == null) || (map != null
&& entry.map != null && map.equals(entry.map))))
if (equalRef(entry)
&& ((map == null && entry.map == null) || (map != null
&& entry.map != null && map.equals(entry.map))))
@@
-97,7
+105,9
@@
public class DBRefEntry
return false;
}
if (entry == this)
return false;
}
if (entry == this)
+ {
return true;
return true;
+ }
if ((source != null && entry.source != null && source
.equalsIgnoreCase(entry.source))
&& (accessionId != null && entry.accessionId != null && accessionId
if ((source != null && entry.source != null && source
.equalsIgnoreCase(entry.source))
&& (accessionId != null && entry.accessionId != null && accessionId
@@
-183,4
+193,9
@@
public class DBRefEntry
return ((source != null) ? source : "") + ":"
+ ((accessionId != null) ? accessionId : "");
}
return ((source != null) ? source : "") + ":"
+ ((accessionId != null) ? accessionId : "");
}
+
+ public String toString()
+ {
+ return getSrcAccString();
+ }
}
}