JAL-3383 JAL-3253-applet
[jalview.git] / src / jalview / datamodel / features / FeatureStoreImpl.java
index d1d2670..02394bb 100644 (file)
@@ -83,6 +83,16 @@ public class FeatureStoreImpl extends FeatureStore
   }
 
   /**
+   * Adds one feature to the IntervalStore that can manage nested features
+   * (creating the IntervalStore if necessary)
+   */
+  @Override
+  protected synchronized void addNestedFeature(SequenceFeature feature)
+  {
+    features.add(feature);
+  }
+
+  /**
    * Adds contact features to the result list where either the second or the
    * first contact position lies within the target range
    * 
@@ -101,6 +111,12 @@ public class FeatureStoreImpl extends FeatureStore
     }
   }
 
+  @Override
+  protected boolean containsFeature(SequenceFeature feature)
+  {
+    return features.contains(feature);
+  }
+
   /**
    * Adds to the result list any contact features whose end (second contact
    * point), but not start (first contact point), lies in the query from-to
@@ -238,6 +254,13 @@ public class FeatureStoreImpl extends FeatureStore
     return findFirstBeginStatic(list, pos);
   }
 
+  /**
+   * Possibly a bit faster using a static method.
+   * 
+   * @param list
+   * @param pos
+   * @return
+   */
   private static int findFirstBeginStatic(List<SequenceFeature> list,
           long pos)
   {
@@ -250,6 +273,13 @@ public class FeatureStoreImpl extends FeatureStore
     return findFirstEndStatic(list, pos);
   }
 
+  /**
+   * Possibly a bit faster using a static method.
+   * 
+   * @param list
+   * @param pos
+   * @return
+   */
   private static int findFirstEndStatic(List<SequenceFeature> list,
           long pos)
   {