JAL-4027 getter for contact matrices on the Alignment.
[jalview.git] / src / jalview / datamodel / Alignment.java
index ea04361..0aa8424 100755 (executable)
@@ -23,6 +23,7 @@ package jalview.datamodel;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.BitSet;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -2034,6 +2035,17 @@ public class Alignment implements AlignmentI, AutoCloseable
   }
 
   Map<Object, ContactMatrixI> contactmaps = new HashMap<>();
+
+  @Override
+  public Collection<ContactMatrixI> getContactMaps()
+  {
+    if (contactmaps != null && contactmaps.size() > 0)
+    {
+      return contactmaps.values();
+    }
+    return Collections.EMPTY_LIST;
+  }
+
   @Override
   public ContactListI getContactListFor(AlignmentAnnotation _aa, int column)
   {