JAL-3253-applet JAL-3397
[jalview.git] / test / intervalstore / nonc / SimpleFeature.java
index d10d90a..e05d1e3 100644 (file)
@@ -31,12 +31,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 package intervalstore.nonc;
 
-import intervalstore.api.IntervalI;
+import jalview.datamodel.SequenceFeature;
 
 /**
- * A simplified feature instance sufficient for unit test purposes
+ * A simplified feature instance sufficient for unit test purposes.
+ * 
+ * Subclasses SequenceFeature only because otherwise we have to use equals() in
+ * the Jalview version of nonc.IntervalStore, and that does a class check that
+ * we were trying to avoid.
+ * 
  */
-public class SimpleFeature implements IntervalI
+public class SimpleFeature extends SequenceFeature
 {
   final private int begin;
 
@@ -53,6 +58,7 @@ public class SimpleFeature implements IntervalI
    */
   public SimpleFeature(int from, int to, String desc)
   {
+    super("", desc, from, to, "");
     begin = from;
     end = to;
     description = desc;
@@ -80,6 +86,7 @@ public class SimpleFeature implements IntervalI
     return end;
   }
 
+  @Override
   public String getDescription()
   {
     return description;