You can add LinkedHashSet object (linkedHashSet) to TreeSet and it will be sorted.
TreeSet treeSet = new TreeSet();
treeSet.addAll(linkedHashSet);
treeSet is the sorted set.
Note that you need to make these T type comparable(by implementing Comparator interface).