isAligned method added
authoramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 13:20:33 +0000 (13:20 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 13:20:33 +0000 (13:20 +0000)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java

index 0875450..62b9ea9 100755 (executable)
@@ -500,6 +500,17 @@ public class Alignment implements AlignmentI
   {\r
     return AAFrequency.calculate(sequences, 0, getWidth());\r
   }\r
+\r
+  public boolean isAligned()\r
+  {\r
+    int width = getWidth();\r
+    for (int i = 0; i < sequences.size(); i++)\r
+      if (getSequenceAt(i).getLength() != width)\r
+        return false;\r
+\r
+    return true;\r
+\r
+  }\r
 }\r
 \r
 \r
index 80b22ae..182b687 100755 (executable)
@@ -11,6 +11,8 @@ public interface AlignmentI {
   public int         getWidth() ;\r
   public int         getMaxIdLength() ;\r
 \r
+  public boolean isAligned();\r
+\r
   public Vector      getSequences();\r
   public SequenceI   getSequenceAt(int i);\r
 \r