int pt0 = pt;
while (--pt >= 0 && offsets[pt] == 0)
{
- ;
+
}
if (pt < 0)
{
}
/**
- * 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
*/
boolean sameInterval(IntervalI i1, IntervalI i2)
{
- // avoiding equals() for JavaScript performance
return ((SequenceFeature) i1).equals((SequenceFeature) i2, false);
}