Example usage for Java com.google.common.collect MinMaxPriorityQueue fields, constructors, methods, implement or subclass
The text is from its open source code.
int | maximumSize |
int | size |
boolean | add(E element) Adds the given element to this queue. |
boolean | addAll(Collection extends E> newElements) |
void | clear() |
MinMaxPriorityQueue | create() Creates a new min-max priority queue with default settings: natural order, no maximum size, no initial contents, and an initial expected size of 11. |
Builder | expectedSize(int expectedSize) Creates and returns a new builder, configured to build MinMaxPriorityQueue instances sized appropriately to hold expectedSize elements. |
Iterator | iterator() Returns an iterator over the elements contained in this collection, in no particular order. |
boolean | offer(E element) Adds the given element to this queue. |
Builder | orderedBy(Comparator comparator) Creates and returns a new builder, configured to build MinMaxPriorityQueue instances that use comparator to determine the least and greatest elements. |
E | peek() |
E | peekFirst() Retrieves, but does not remove, the least element of this queue, or returns null if the queue is empty. |
E | peekLast() Retrieves, but does not remove, the greatest element of this queue, or returns null if the queue is empty. |
E | poll() |
E | pollFirst() Removes and returns the least element of this queue, or returns null if the queue is empty. |
E | pollLast() Removes and returns the greatest element of this queue, or returns null if the queue is empty. |
E | removeFirst() Removes and returns the least element of this queue. |
E | removeLast() Removes and returns the greatest element of this queue. |