JAL-2189 source formatting
[jalview.git] / src / jalview / util / MapList.java
index dc5bee8..58abdc3 100644 (file)
@@ -342,7 +342,8 @@ public class MapList
    */
   public static List<int[]> coalesceRanges(final List<int[]> ranges)
   {
-    if (ranges == null || ranges.size() < 2) {
+    if (ranges == null || ranges.size() < 2)
+    {
       return ranges;
     }
 
@@ -353,7 +354,7 @@ public class MapList
     lastRange = new int[] { lastRange[0], lastRange[1] };
     merged.add(lastRange);
     boolean first = true;
-    
+
     for (final int[] range : ranges)
     {
       if (first)
@@ -387,7 +388,8 @@ public class MapList
        * if next range is in the same direction as last and contiguous,
        * just update the end position of the last range
        */
-      boolean sameDirection = range[1] == range[0] || direction == lastDirection;
+      boolean sameDirection = range[1] == range[0]
+              || direction == lastDirection;
       boolean extending = range[0] == lastRange[1] + lastDirection;
       boolean overlapping = (lastDirection == 1 && range[0] >= lastRange[0] && range[0] <= lastRange[1])
               || (lastDirection == -1 && range[0] <= lastRange[0] && range[0] >= lastRange[1]);
@@ -404,7 +406,7 @@ public class MapList
         lastDirection = (range[1] == range[0]) ? lastDirection : direction;
       }
     }
-    
+
     return changed ? merged : ranges;
   }