Given the data structure for which an iterator is defined. It contains elements that can be compared with each other by value. The type of such a structure can be defined as Iterable<T> , while T implements the interface Comparable<T> .
How to correctly declare a class for such a structure?