+
+ /**
+ * returns the SequenceI's with exact word matches to candName
+ *
+ * @param candName
+ * SeqIdName
+ * @param matches
+ * List of SequenceI objects - some of which may be duplicates
+ * @return { word matches to candName }
+ */
+ private List<SequenceI> pickwordMatches(SeqIdName candName,
+ List<SequenceI> matches)
+ {
+ List<SequenceI> best = new ArrayList<SequenceI>();
+ for (SequenceI match : matches)
+ {
+ if (!best.contains(match))
+ {
+ if (candName.equalsCase(match.getDisplayId(true)))
+ {
+ // put the exact match at the beginning
+ best.add(0, match);
+ }
+ else
+ {
+ best.add(match);
+ }
+ addSeq(match);
+ }
+ }
+ return best;
+ }