Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / datamodel / SequenceI.java
index 9d86043..7ecb4ed 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -337,7 +337,14 @@ public interface SequenceI extends ASequenceI
    */
   public void addDBRef(DBRefEntry entry);
 
-  public void addSequenceFeature(SequenceFeature sf);
+  /**
+   * Adds the given sequence feature and returns true, or returns false if it is
+   * already present on the sequence
+   * 
+   * @param sf
+   * @return
+   */
+  public boolean addSequenceFeature(SequenceFeature sf);
 
   public void deleteFeature(SequenceFeature sf);
 
@@ -468,4 +475,15 @@ public interface SequenceI extends ASequenceI
    *         list
    */
   public List<DBRefEntry> getPrimaryDBRefs();
+
+  /**
+   * Returns a (possibly empty) list of sequence features of the given type that
+   * overlap the range from-to (inclusive)
+   * 
+   * @param type
+   * @param from
+   * @param to
+   * @return
+   */
+  List<SequenceFeature> findFeatures(String type, int from, int to);
 }