JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / jalview / gui / structurechooser / TDBResultAnalyser.java
index a453529..09ff0aa 100644 (file)
@@ -116,8 +116,8 @@ public class TDBResultAnalyser
       String provider = (String) row.getSummaryData()[idx_mprov];
       String mcat = (String) row.getSummaryData()[idx_mcat];
       // this makes sure all new categories are in the score array.
-      int scorecat = scoreCategory(mcat); 
-      if (sourceFilter == null ||  sourceFilter.equals(provider))
+      int scorecat = scoreCategory(mcat);
+      if (sourceFilter == null || sourceFilter.equals(provider))
       {
         if (seq == row.getSummaryData()[0] && up_e > seq.getStart()
                 && up_s < seq.getEnd())
@@ -138,12 +138,13 @@ public class TDBResultAnalyser
         int o1_s = (Integer) o1data[idx_ups];
         int o1_e = (Integer) o1data[idx_upe];
         int o1_cat = scoreCategory((String) o1data[idx_mcat]);
-        String o1_prov= ((String) o1data[idx_mprov]).toUpperCase(Locale.ROOT);
+        String o1_prov = ((String) o1data[idx_mprov])
+                .toUpperCase(Locale.ROOT);
         int o2_s = (Integer) o2data[idx_ups];
         int o2_e = (Integer) o2data[idx_upe];
         int o2_cat = scoreCategory((String) o2data[idx_mcat]);
-        String o2_prov= ((String) o2data[idx_mprov]).toUpperCase(Locale.ROOT);
-        
+        String o2_prov = ((String) o2data[idx_mprov])
+                .toUpperCase(Locale.ROOT);
 
         if (o1_cat == o2_cat)
         {
@@ -155,27 +156,37 @@ public class TDBResultAnalyser
             {
               if (o1_cat == scoreCategory(EXP_CATEGORIES.get(0)))
               {
-                if (o1_prov.equals(o2_prov)) {
-                  if ("PDBE".equals(o1_prov)) {
-                    if (eitherNull(idx_resol,o1data,o2data))
+                if (o1_prov.equals(o2_prov))
+                {
+                  if ("PDBE".equals(o1_prov))
+                  {
+                    if (eitherNull(idx_resol, o1data, o2data))
                     {
-                       return nonNullFirst(idx_resol,o1data,o2data);
+                      return nonNullFirst(idx_resol, o1data, o2data);
                     }
-                // experimental structures, so rank on quality
-                double o1_res = (Double) o1data[idx_resol];
-                double o2_res = (Double) o2data[idx_resol];
-                return (o2_res < o1_res) ? 1 : (o2_res == o1_res) ? 0 : -1;
-                } else {
-                  return 0; // no change in order
+                    // experimental structures, so rank on quality
+                    double o1_res = (Double) o1data[idx_resol];
+                    double o2_res = (Double) o2data[idx_resol];
+                    return (o2_res < o1_res) ? 1
+                            : (o2_res == o1_res) ? 0 : -1;
+                  }
+                  else
+                  {
+                    return 0; // no change in order
+                  }
+                }
+                else
+                {
+                  // PDBe always ranked above all other experimentally
+                  // determined categories
+                  return "PDBE".equals(o1_prov) ? -1
+                          : "PDBE".equals(o2_prov) ? 1 : 0;
                 }
-              } else {
-                // PDBe always ranked above all other experimentally determined categories
-                return "PDBE".equals(o1_prov) ? -1 : "PDBE".equals(o2_prov) ? 1 : 0;
-              }
               }
               else
               {
-                if (eitherNull(idx_mqual,o1data, o2data)) {
+                if (eitherNull(idx_mqual, o1data, o2data))
+                {
                   return nonNullFirst(idx_mqual, o1data, o2data);
                 }
                 // models, so rank on qmean - b
@@ -203,13 +214,14 @@ public class TDBResultAnalyser
       private int nonNullFirst(int idx_resol, Object[] o1data,
               Object[] o2data)
       {
-          return o1data[idx_resol] == o2data[idx_resol] ? 0: o1data[idx_resol] != null ? -1 : 1; 
+        return o1data[idx_resol] == o2data[idx_resol] ? 0
+                : o1data[idx_resol] != null ? -1 : 1;
       }
 
       private boolean eitherNull(int idx_resol, Object[] o1data,
               Object[] o2data)
       {
-        return (o1data[idx_resol] == null || o2data[idx_resol]==null);
+        return (o1data[idx_resol] == null || o2data[idx_resol] == null);
       }
 
       @Override
@@ -254,7 +266,7 @@ public class TDBResultAnalyser
         cover.andNot(scover);
       }
     }
-    if (selected.size()==0)
+    if (selected.size() == 0)
     {
       return selected;
     }