JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / jalview / datamodel / features / FeatureStore.java
index 7651016..eb5688c 100644 (file)
@@ -182,18 +182,17 @@ public class FeatureStore
   {
     if (feature.isNonPositional())
     {
-      return nonPositionalFeatures == null ? false : nonPositionalFeatures
-              .contains(feature);
+      return nonPositionalFeatures == null ? false
+              : nonPositionalFeatures.contains(feature);
     }
 
     if (feature.isContactFeature())
     {
-      return contactFeatureStarts == null ? false : listContains(
-              contactFeatureStarts, feature);
+      return contactFeatureStarts == null ? false
+              : listContains(contactFeatureStarts, feature);
     }
 
-    return features == null ? false : features
-            .contains(feature);
+    return features == null ? false : features.contains(feature);
   }
 
   /**
@@ -280,13 +279,12 @@ public class FeatureStore
             true, Compare.GE, feature.getBegin());
     contactFeatureStarts.add(insertPosition, feature);
 
-
     /*
      * insert into list sorted by end (second contact position):
      * binary search the sorted list to find the insertion point
      */
-    insertPosition = BinarySearcher.findFirst(contactFeatureEnds,
-            false, Compare.GE, feature.getEnd());
+    insertPosition = BinarySearcher.findFirst(contactFeatureEnds, false,
+            Compare.GE, feature.getEnd());
     contactFeatureEnds.add(insertPosition, feature);
 
     return true;
@@ -395,16 +393,16 @@ public class FeatureStore
      * find the first contact feature (if any) 
      * whose end point is not before the target range
      */
-    int index = BinarySearcher.findFirst(contactFeatureEnds,
-            false, Compare.GE, (int) from);
+    int index = BinarySearcher.findFirst(contactFeatureEnds, false,
+            Compare.GE, (int) from);
 
     while (index < contactFeatureEnds.size())
     {
       SequenceFeature sf = contactFeatureEnds.get(index);
       if (!sf.isContactFeature())
       {
-        System.err.println("Error! non-contact feature type "
-                + sf.getType() + " in contact features list");
+        System.err.println("Error! non-contact feature type " + sf.getType()
+                + " in contact features list");
         index++;
         continue;
       }
@@ -448,8 +446,8 @@ public class FeatureStore
   protected void findContactStartOverlaps(long from, long to,
           List<SequenceFeature> result)
   {
-    int index = BinarySearcher.findFirst(contactFeatureStarts,
-            true, Compare.GE, (int) from);
+    int index = BinarySearcher.findFirst(contactFeatureStarts, true,
+            Compare.GE, (int) from);
 
     while (index < contactFeatureStarts.size())
     {
@@ -675,10 +673,9 @@ public class FeatureStore
   public boolean isEmpty()
   {
     boolean hasFeatures = (contactFeatureStarts != null
-            && !contactFeatureStarts
-                    .isEmpty())
-            || (nonPositionalFeatures != null && !nonPositionalFeatures
-                    .isEmpty())
+            && !contactFeatureStarts.isEmpty())
+            || (nonPositionalFeatures != null
+                    && !nonPositionalFeatures.isEmpty())
             || (features != null && features.size() > 0);
 
     return !hasFeatures;
@@ -700,9 +697,9 @@ public class FeatureStore
     }
     else
     {
-      return nonPositionalFeatureGroups == null ? Collections
-              .<String> emptySet() : Collections
-              .unmodifiableSet(nonPositionalFeatureGroups);
+      return nonPositionalFeatureGroups == null
+              ? Collections.<String> emptySet()
+              : Collections.unmodifiableSet(nonPositionalFeatureGroups);
     }
   }
 
@@ -717,8 +714,8 @@ public class FeatureStore
   {
     if (!positional)
     {
-      return nonPositionalFeatures == null ? 0 : nonPositionalFeatures
-              .size();
+      return nonPositionalFeatures == null ? 0
+              : nonPositionalFeatures.size();
     }
 
     int size = 0;
@@ -802,8 +799,8 @@ public class FeatureStore
     for (SequenceFeature sf : sfs)
     {
       String featureGroup = sf.getFeatureGroup();
-      if (group == null && featureGroup == null || group != null
-              && group.equals(featureGroup))
+      if (group == null && featureGroup == null
+              || group != null && group.equals(featureGroup))
       {
         result.add(sf);
       }