Class MinMaxPriorityQueue.Builder<B>
java.lang.Object
com.google.common.collect.MinMaxPriorityQueue.Builder<B>
- Type Parameters:
- B- the upper bound on the eventual type that can be produced by this builder (for example, a- Builder<Number>can produce a- Queue<Number>or- Queue<Integer>but not a- Queue<Object>).
- Enclosing class:
- MinMaxPriorityQueue<E>
The builder class used in creation of min-max priority queues. Instead of constructing one
 directly, use 
MinMaxPriorityQueue.orderedBy(Comparator), MinMaxPriorityQueue.expectedSize(int) or MinMaxPriorityQueue.maximumSize(int).- Since:
- 8.0
- Author:
- Sverre Sundsdal, Torbjorn Gannholm
- 
Method SummaryModifier and TypeMethodDescription<T extends B>
 MinMaxPriorityQueue<T> create()Builds a new min-max priority queue using the previously specified options, and having no initial contents.<T extends B>
 MinMaxPriorityQueue<T> Builds a new min-max priority queue using the previously specified options, and having the given initial elements.expectedSize(int expectedSize) Configures this builder to build min-max priority queues with an initial expected size ofexpectedSize.maximumSize(int maximumSize) Configures this builder to buildMinMaxPriorityQueueinstances that are limited tomaximumSizeelements.
- 
Method Details- 
expectedSizeConfigures this builder to build min-max priority queues with an initial expected size ofexpectedSize.
- 
maximumSizeConfigures this builder to buildMinMaxPriorityQueueinstances that are limited tomaximumSizeelements. Each time a queue grows beyond this bound, it immediately removes its greatest element (according to its comparator), which might be the element that was just added.
- 
createBuilds a new min-max priority queue using the previously specified options, and having no initial contents.
- 
createBuilds a new min-max priority queue using the previously specified options, and having the given initial elements.
 
-