public static < E , S extends SortedSet < E > > SynchronizedSortedSet < E > of ( S set ) { return new SynchronizedSortedSet < E > ( SortedSetAdapter . adapt ( set ) ) ; }
This method will take a MutableSortedSet and wrap it directly in a SynchronizedSortedSet . It will take any other non - GS - collection and first adapt it will a SortedSetAdapter and then return a SynchronizedSortedSet that wraps the adapter .