JAL-3397 final update
[jalview.git] / src / jalview / datamodel / features / FeatureStoreJS.java
index 4f49360..05adeb1 100644 (file)
@@ -25,8 +25,6 @@ import jalview.datamodel.SequenceFeature;
 import java.util.ArrayList;
 import java.util.List;
 
-import intervalstore.nonc.IntervalStore;
-
 /**
  * An adaption of FeatureStore that is efficient and lightweight, accelerating
  * processing speed in JavaScript.
@@ -49,15 +47,16 @@ import intervalstore.nonc.IntervalStore;
  */
 public class FeatureStoreJS extends FeatureStore
 {
-  private IntervalStore<SequenceFeature> featureStore;
 
+  
   public FeatureStoreJS()
   {
-    // the only reference to features field in this class -- for the superclass
-
-    // linked-list no-NCList IntervalStore with presort
+    super();
+  }
 
-    features = featureStore = new IntervalStore<>(true);
+  public FeatureStoreJS(int option)
+  {
+    super(option);
   }
 
   /**
@@ -84,7 +83,6 @@ public class FeatureStoreJS extends FeatureStore
     return true;
   }
 
-
   /**
    * Add a feature to the IntervalStore, not allowing for duplicates.
    *
@@ -95,7 +93,7 @@ public class FeatureStoreJS extends FeatureStore
   protected synchronized boolean addPositionalFeature(
           SequenceFeature feature)
   {
-    return featureStore.add(feature, false);
+    return features.add(feature, false);
   }
 
   /**
@@ -126,13 +124,13 @@ public class FeatureStoreJS extends FeatureStore
   @Override
   protected boolean containsFeature(SequenceFeature feature)
   {
-    return featureStore.contains(feature);
+    return features.contains(feature);
   }
 
   @Override
   protected boolean findAndRemoveNonContactFeature(SequenceFeature sf)
   {
-    return featureStore.remove(sf);
+    return features.remove(sf);
   }
 
   /**
@@ -252,9 +250,9 @@ public class FeatureStoreJS extends FeatureStore
         findContactFeatures(start, end, result);
       }
     }
-    if (featureStore.size() > 0)
+    if (features.size() > 0)
     {
-      featureStore.findOverlaps(start, end, result);
+      features.findOverlaps(start, end, result);
     }
     return result;
   }