Code example for TreeSet

Methods: iterator

0
        return items.pollLast();
    } 
 
    @Override 
    public Iterator<T> iterator() {
        return items.iterator();
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java