JAL-2480 test coverage / bug fixes / javadoc
[jalview.git] / src / jalview / datamodel / features / FeatureStore.java
index d6a94e2..cb0c36e 100644 (file)
@@ -777,12 +777,13 @@ public class FeatureStore
   }
 
   /**
-   * Answers the number of positional (or non-positional) features stored
+   * Answers the number of positional (or non-positional) features stored.
+   * Contact features count as 1.
    * 
    * @param positional
    * @return
    */
-  public int size(boolean positional)
+  public int getFeatureCount(boolean positional)
   {
     if (!positional)
     {
@@ -807,14 +808,13 @@ public class FeatureStore
   }
 
   /**
-   * Answers the average length of positional features (or zero if there are
-   * none). Contact features contribute a value of 1 to the average.
+   * Answers the total length of positional features (or zero if there are
+   * none). Contact features contribute a value of 1 to the total.
    * 
    * @return
    */
-  public float getAverageFeatureLength()
+  public int getTotalFeatureLength()
   {
-    int d = size(true);
-    return d == 0 ? 0f : (float) totalExtent / d;
+    return totalExtent;
   }
 }