JAL-3383 tidy up NCList and alternatives
[jalview.git] / src / intervalstore / nonc / IntervalStore.java
index effbb55..b010340 100644 (file)
@@ -401,7 +401,7 @@ public class IntervalStore<T extends IntervalI>
       int pt0 = pt;
       while (--pt >= 0 && offsets[pt] == 0)
       {
-        ;
+        
       }
       if (pt < 0)
       {
@@ -1350,26 +1350,15 @@ public class IntervalStore<T extends IntervalI>
   }
 
   /**
-   * CAUTION! This presumes that equalsInterval does check descriptions. Note
-   * that bartongroup.IntervalStoreJ does NOT do this and
-   * jalview.datamodel.features.SequenceFeature does not, either. But
-   * nonc.SimpleFeature in test DOES, because it overrides equalsInterval.
-   * 
-   * The reason we do it this way is to avoid an unnecessary and costly test for
-   * obj instanceof IntervalI.
-   * 
-   * Added by Mungo to use equals, but that requires use of instance checking,
-   * which is not significant in Java (apparently), but is a bigger deal in
-   * JavaScript. So here we have to hack
-   * bobhanson.IntervalStoreJ.nonc.InervalStore to bypass equals.
+   * Tests for instance equality without using {@code instanceof}
    * 
    * @param i1
    * @param i2
    * @return
+   * @throws ClassCastException
    */
   protected boolean sameInterval(IntervalI i1, IntervalI i2)
   {
-    // avoiding equals() for JavaScript performance
     return ((SequenceFeature) i1).equals((SequenceFeature) i2, false);
   }