Class SequencedPriorityIterator<T>

All Implemented Interfaces:
Iterator<T>

public final class SequencedPriorityIterator<T> extends AbstractIterator<T>
  • Field Details

    • MIN_PRIO

      private static final int MIN_PRIO
      See Also:
    • highestPrioQueue

      @Nullable private Deque<T> highestPrioQueue
    • highestPrio

      private int highestPrio
    • queuesByPriority

      private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Deque<T>> queuesByPriority
  • Constructor Details

    • SequencedPriorityIterator

      public SequencedPriorityIterator()
  • Method Details

    • add

      public void add(T pValue, int pPriority)
    • computeNext

      @Nullable protected T computeNext()
      Specified by:
      computeNext in class AbstractIterator<T>
    • switchCacheToNextHighestPrioQueue

      private void switchCacheToNextHighestPrioQueue()