*/
public SequenceI findName(String token, boolean b)
{
-
+ return findName(null, token, b);
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#findName(SequenceI, java.lang.String, boolean)
+ */
+ public SequenceI findName(SequenceI startAfter, String token, boolean b)
+ {
+
int i = 0;
SequenceI sq=null;
String sqname=null;
+ if (startAfter!=null)
+ {
+ // try to find the sequence in the alignment
+ boolean matched=false;
+ while (i<sequences.size())
+ {
+ if (getSequenceAt(i++)==startAfter)
+ {
+ matched = true;
+ break;
+ }
+ }
+ if (!matched)
+ {
+ i=0;
+ }
+ }
while (i < sequences.size())
{
sq = getSequenceAt(i);
* @return matched sequence or null
*/
public SequenceI findName(String token, boolean b);
+ /**
+ * find next sequence with given name in alignment starting after a given sequence
+ * @param startAfter the sequence after which the search will be started (usually the result of the last call to findName)
+ * @param token name to find
+ * @param b true implies that case insensitive matching will <em>also</em> be tried
+ * @return matched sequence or null
+ */
+ public SequenceI findName(SequenceI startAfter, String token, boolean b);
}