/**
   * Return all groups starting with the passed in prefix.
   *
   * @param start The start of a groups you want to match.
   * @return A collection of groups that match the passed string.
   */
  public Collection<FunctionGroup> getGroupsStartingWith(String start) {
    if (start.length() == 0) {
      return groupTree;
    }
    start = start.toLowerCase();

    if (start.length() > maxGroupLength) return new TreeSet<FunctionGroup>();
    try {
      // Uses tree subset to find the groups greater than start or less than
      return groupTree.subSet(new FunctionGroup(start), new FunctionGroup(getSearchLimit(start)));
    } catch (IllegalArgumentException e) {
      ZDebug.printStackTrace(e, "Invalid search limit");
    }
    return new TreeSet<FunctionGroup>();
  }