- Type Parameters:
T
- type of elements in queue.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A sorter sorts it input.
The implementation is expected to return the same queue instance.
- Author:
- Pieter van den Hombergh
-
Method Summary
-
Method Details
-
sort
Return the input queue in sorted order, based on the passed comparator.- Parameters:
queue
- to be sortedcomparator
- to base sorting on- Returns:
- the queue with the elements in non-descending order as per the comparator.
-