public int getNextMatch(String prefix, int startIndex, Position.Bias bias)
public int getNextMatch(String prefix, int startIndex, Position.Bias direction)
  public int getNextMatch(String prefix, int startIndex, Position.Bias bias)  {    if (prefix == null)      throw new IllegalArgumentException("The argument 'prefix' must not be"                                         + " null.");    if (startIndex < 0)      throw new IllegalArgumentException("The argument 'startIndex' must not"                                         + " be less than zero.");    int size = model.getSize();    if (startIndex > model.getSize())      throw new IllegalArgumentException("The argument 'startIndex' must not"                                         + " be greater than the number of"                                         + " elements in the ListModel.");    int index = -1;    if (bias == Position.Bias.Forward)      {        for (int i = startIndex; i < size; i++)          {            String item = model.getElementAt(i).toString();            if (item.startsWith(prefix))              {                index = i;                break;              }          }      }    else      {        for (int i = startIndex; i >= 0; i--)          {            String item = model.getElementAt(i).toString();            if (item.startsWith(prefix))              {                index = i;                break;              }          }      }    return index;  }