toSet abstract method

Set<E> toSet()

Return a comparator based set using the comparator of this queue.

The queue is not modified.

The returned Set is currently a SplayTreeSet, but this may change as other ordered sets are implemented.

The set contains all the elements of this queue. If an element occurs more than once in the queue, the set will contain it only once.

Implementation

Set<E> toSet();