Class MinMaxPriorityQueue.Builder<B>

    • Method Detail

      • maximumSize

        @CanIgnoreReturnValue
        public MinMaxPriorityQueue.Builder<BmaximumSize(int maximumSize)
        Configures this builder to build MinMaxPriorityQueue instances that are limited to maximumSize elements. 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.
      • create

        public <T extends BMinMaxPriorityQueue<T> create()
        Builds a new min-max priority queue using the previously specified options, and having no initial contents.
      • create

        public <T extends BMinMaxPriorityQueue<T> create(Iterable<? extends T> initialContents)
        Builds a new min-max priority queue using the previously specified options, and having the given initial elements.