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-34 - quick hack to see how we can do alignment comparison for splitframes linking...
[jalview.git]
/
src
/
jalview
/
datamodel
/
ContactMapHolder.java
diff --git
a/src/jalview/datamodel/ContactMapHolder.java
b/src/jalview/datamodel/ContactMapHolder.java
index
d80a719
..
45c0d18
100644
(file)
--- a/
src/jalview/datamodel/ContactMapHolder.java
+++ b/
src/jalview/datamodel/ContactMapHolder.java
@@
-3,6
+3,7
@@
package jalview.datamodel;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import jalview.ws.datamodel.MappableContactMatrixI;
import java.util.Map;
import jalview.ws.datamodel.MappableContactMatrixI;
@@
-17,7
+18,9
@@
public class ContactMapHolder implements ContactMapHolderI
{
if (contactmaps != null && contactmaps.size() > 0)
{
{
if (contactmaps != null && contactmaps.size() > 0)
{
- return contactmaps.values();
+ // defensive copy, and return non redundant set of ContactMatrixI
+ // instances
+ return new HashSet<ContactMatrixI>(contactmaps.values());
}
return Collections.EMPTY_LIST;
}
}
return Collections.EMPTY_LIST;
}
@@
-32,9
+35,10
@@
public class ContactMapHolder implements ContactMapHolderI
}
if (cm instanceof MappableContactMatrixI)
{
}
if (cm instanceof MappableContactMatrixI)
{
- if (_aa.sequenceRef!=null)
+ if (_aa.sequenceRef != null)
{
{
- return ((MappableContactMatrixI)cm).getMappableContactList(_aa.sequenceRef, column);
+ return ((MappableContactMatrixI) cm)
+ .getMappableContactList(_aa.sequenceRef, column);
}
}
// TODO: could resolve sequence position to column position here
}
}
// TODO: could resolve sequence position to column position here