formatting
[jalview.git] / src / jalview / ws / rest / params / SeqGroupIndexVector.java
index 2c6d78a..e47a58b 100644 (file)
@@ -93,39 +93,39 @@ public class SeqGroupIndexVector extends InputType implements
     ArrayList<int[]> gl = new ArrayList<int[]>();
     int p = 0;
     List<SequenceGroup> sgs;
-    synchronized (sgs=al.getGroups())
+    synchronized (sgs = al.getGroups())
     {
-    for (SequenceGroup sg : sgs)
-    {
-      if (sg.getSize() < minsize)
-      {
-        throw new NoValidInputDataException("Group contains less than "
-                + minsize + " sequences.");
-      }
-      // TODO: refactor to sequenceGroup for efficiency -
-      // getAlignmentRowInterval(AlignmentI al)
-      int[] se = null;
-      for (SequenceI sq : sg.getSequencesInOrder(al))
+      for (SequenceGroup sg : sgs)
       {
-        p = al.findIndex(sq);
-        if (se == null)
+        if (sg.getSize() < minsize)
         {
-          se = new int[]
-          { p, p };
+          throw new NoValidInputDataException("Group contains less than "
+                  + minsize + " sequences.");
         }
-        else
+        // TODO: refactor to sequenceGroup for efficiency -
+        // getAlignmentRowInterval(AlignmentI al)
+        int[] se = null;
+        for (SequenceI sq : sg.getSequencesInOrder(al))
+        {
+          p = al.findIndex(sq);
+          if (se == null)
+          {
+            se = new int[]
+            { p, p };
+          }
+          else
+          {
+            if (p < se[0])
+              se[0] = p;
+            if (p > se[1])
+              se[1] = p;
+          }
+        }
+        if (se != null)
         {
-          if (p < se[0])
-            se[0] = p;
-          if (p > se[1])
-            se[1] = p;
+          gl.add(se);
         }
       }
-      if (se != null)
-      {
-        gl.add(se);
-      }
-    }
     }
     // are there any more sequences ungrouped that should be added as a single
     // remaining group ? - these might be at the start or the end
@@ -298,8 +298,11 @@ public class SeqGroupIndexVector extends InputType implements
             "Separator character between elements of vector", true, ",",
             sep, Arrays.asList(new String[]
             { " ", ",", ";", "\t", "|" }), null));
-    lst.add(new IntegerParameter("minsize", "Minimum size of partition allowed by service", true, 1, minsize, 1,0));
-    lst.add(createMolTypeOption("type", "Sequence type", false, type, molType.MIX));
+    lst.add(new IntegerParameter("minsize",
+            "Minimum size of partition allowed by service", true, 1,
+            minsize, 1, 0));
+    lst.add(createMolTypeOption("type", "Sequence type", false, type,
+            molType.MIX));
     return lst;
   }