Java Utililty Methods SortedSet Create

List of utility methods to do SortedSet Create

Description

The list of methods to do SortedSet Create are organized into topic(s).

Method

SortedSetgetSortedSet(int begin, int end)
get Sorted Set
SortedSet<Integer> set = new TreeSet<>();
for (int i = begin; i < end; i++) {
    set.add(i);
return set;
SortedSetgetSortedSet(String s)
get Sorted Set
SortedSet<String> sortedSet = new TreeSet<String>();
if (s == null || s.length() == 0)
    return sortedSet;
String[] sa = s.split(" ");
for (int i = 0; i < sa.length; i++) {
    sortedSet.add(sa[i]);
return sortedSet;
...