package com.michaelthomas.collection; /** * @author Michael Thomas (www.michael-thomas.com) michael@michael-thomas.com * */ import java.util.Collection; import java.util.TreeSet; public class MyCollectionSort { //NOTE: For learning, you must see the JUnit test file in the /test/ directory and matching package! public Collection sortTheCollection(Collection source) { //Pass in any Collection and a sorted Collection will be returned. Collection sorted = new TreeSet(source); //TreeSet implements SortedSet interface return sorted; } }