code: public static SortedSet<String> splitSorted(String str, String sepStr) {
          // Split but watch out for empty substrings.
          SortedSet<String> result = new TreeSet<String>();
          if (str != null) {
              for (String value : str.split(sepStr)) {
                  if (value.length() > 0) {
                      result.add(value);
                  }
              }
          }
          return result;
      }
docs: Split the given string using the given separate, returning the components as a
  SortedSet. This method is similar to {@link #split(String, String)} except that
  values are sorted by string value. If a null or empty string is passed, an empty
  set is returned.
  
  @param str       String to be split.
  @param sepStr    Separator string that lies between values.
  @return          SortedSet of separated substrings. The set may be empty but it
  will not be null.