JAL-3253-applet JAL-3397
[jalview.git] / src / jalview / datamodel / features / FeatureStore.java
index 4073dd6..b7cd330 100644 (file)
@@ -101,26 +101,23 @@ public class FeatureStore
   /**
    * linked-list IntervalStore
    */
-  public final static int INTERVAL_STORE_LINKED_LIST_PRESORT = 1;
-
-  /**
-   * linked-list IntervalStore
-   */
-  public final static int INTERVAL_STORE_LINKED_LIST_NO_PRESORT = 2;
-
-  /**
-   * NCList as array buffer IntervalStore
-   */
-  public final static int INTERVAL_STORE_NCLIST_BUFFER_PRESORT = 3;
+  public final static int INTERVAL_STORE_LINKED_LIST = 1;
 
   /**
    * NCList as array buffer IntervalStore
    */
-  public final static int INTERVAL_STORE_NCLIST_BUFFER_NO_PRESORT = 4;
+  public final static int INTERVAL_STORE_NCARRAY = 3;
 
   static final int intervalStoreJavaOption = INTERVAL_STORE_NCLIST_OBJECT;
 
-  static final int intervalStoreJSOption = INTERVAL_STORE_NCLIST_BUFFER_PRESORT;
+  private final static boolean isJSLinkedTest = false;
+
+  static final int intervalStoreJSOption = (isJSLinkedTest
+          ? INTERVAL_STORE_LINKED_LIST
+          : INTERVAL_STORE_NCARRAY);
+
+  // TODO: compare performance in real situations using
+  // INTERVAL_STORE_LINKED_LIST;
 
   /**
    * Answers the 'length' of the feature, counting 0 for non-positional features
@@ -259,14 +256,10 @@ public class FeatureStore
     default:
     case INTERVAL_STORE_NCLIST_OBJECT:
       return new intervalstore.impl.IntervalStore<>();
-    case INTERVAL_STORE_NCLIST_BUFFER_PRESORT:
-      return new intervalstore.nonc.IntervalStore<>(true);
-    case INTERVAL_STORE_NCLIST_BUFFER_NO_PRESORT:
-      return new intervalstore.nonc.IntervalStore<>(false);
-    case INTERVAL_STORE_LINKED_LIST_PRESORT:
-      return new intervalstore.nonc.IntervalStore0<>(true);
-    case INTERVAL_STORE_LINKED_LIST_NO_PRESORT:
-      return new intervalstore.nonc.IntervalStore0<>(false);
+    case INTERVAL_STORE_NCARRAY:
+      return new intervalstore.nonc.IntervalStore<>();
+    case INTERVAL_STORE_LINKED_LIST:
+      return new intervalstore.nonc.IntervalStore0<>();
     }
   }