Looking at Java API, there’s the SortedSet
interface which has Set
as superinterface: https://docs.oracle.com/javase/7/docs/api/java/util/SortedSet.html with two implementing classes, https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentSkipListSet.html and https://docs.oracle.com/javase/7/docs/api/java/util/TreeSet.html . Maybe one of those?