JAL-3383 tidy method signature and Javadoc
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 3 Oct 2019 14:57:11 +0000 (15:57 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 3 Oct 2019 14:57:11 +0000 (15:57 +0100)
src/jalview/datamodel/features/FeatureStore.java

index 6204f18..653d389 100644 (file)
@@ -232,6 +232,13 @@ public class FeatureStore
     // only construct nonPositionalFeatures or contactFeatures if needed
   }
 
+  /**
+   * Returns a new instance of IntervalStoreI of implementation as selected by
+   * the type parameter
+   * 
+   * @param type
+   * @return
+   */
   private IntervalStoreI<SequenceFeature> getIntervalStore(
           IntervalStoreType type)
   {
@@ -540,25 +547,29 @@ public class FeatureStore
     return result;
   }
 
+  /**
+   * Returns a (possibly empty) list of stored contact features
+   * 
+   * @return
+   */
   public List<SequenceFeature> getContactFeatures()
   {
-    return getContactFeatures(new ArrayList<>());
+    List<SequenceFeature> result = new ArrayList<>();
+    getContactFeatures(result);
+    return result;
   }
 
   /**
-   * Answers a list of all contact features. If there are none, returns an
-   * immutable empty list.
+   * Adds any stored contact features to the result list
    * 
    * @return
    */
-  public List<SequenceFeature> getContactFeatures(
-          List<SequenceFeature> result)
+  public void getContactFeatures(List<SequenceFeature> result)
   {
     if (contactFeatureStarts != null)
     {
       result.addAll(contactFeatureStarts);
     }
-    return result;
   }
 
   /**