return result;
}
-
- /** */
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#findIndex(jalview.datamodel.SequenceI)
+ */
public int findIndex(SequenceI s)
{
int i = 0;
return -1;
}
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#findIndex(jalview.datamodel.SearchResults)
+ */
+ public int findIndex(SearchResults results)
+ {
+ int i=0;
+
+ while (i<sequences.size())
+ {
+ if (results.involvesSequence(getSequenceAt(i)))
+ {
+ return i;
+ }
+ i++;
+ }
+ return -1;
+ }
/**
* DOCUMENT ME!
}
return removed;
}
+
}
* @param s
* Sequence to look for.
*
- * @return Index of sequence within the alignment.
+ * @return Index of sequence within the alignment or -1 if not found
*/
public int findIndex(SequenceI s);
*/
public SequenceI findName(SequenceI startAfter, String token, boolean b);
+ /**
+ * find first sequence in alignment which is involved in the given search result object
+ * @param results
+ * @return -1 or index of sequence in alignment
+ */
+ public int findIndex(SearchResults results);
+
}