Class PriorityIterator<T>

All Implemented Interfaces:
Iterator<T>

public final class PriorityIterator<T> extends AbstractIterator<T>
A queue-like iterator that orders its values by the priority, or the insertion order if the priorities equal.
Mappings:
Namespace Name
named net/minecraft/util/collection/PriorityIterator
intermediary net/minecraft/class_8917
official ayz
  • Field Details

    • LOWEST_PRIORITY

      private static final int LOWEST_PRIORITY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LOWEST_PRIORITY Lnet/minecraft/util/collection/PriorityIterator;LOWEST_PRIORITY:I
      intermediary field_48714 Lnet/minecraft/class_8917;field_48714:I
      official a Layz;a:I
    • maxPriorityQueue

      @Nullable private @Nullable Deque<T> maxPriorityQueue
      Mappings:
      Namespace Name Mixin selector
      named maxPriorityQueue Lnet/minecraft/util/collection/PriorityIterator;maxPriorityQueue:Ljava/util/Deque;
      intermediary field_48715 Lnet/minecraft/class_8917;field_48715:Ljava/util/Deque;
      official b Layz;b:Ljava/util/Deque;
    • maxPriority

      private int maxPriority
      Mappings:
      Namespace Name Mixin selector
      named maxPriority Lnet/minecraft/util/collection/PriorityIterator;maxPriority:I
      intermediary field_48716 Lnet/minecraft/class_8917;field_48716:I
      official c Layz;c:I
    • queuesByPriority

      private final Int2ObjectMap<Deque<T>> queuesByPriority
      Mappings:
      Namespace Name Mixin selector
      named queuesByPriority Lnet/minecraft/util/collection/PriorityIterator;queuesByPriority:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
      intermediary field_48717 Lnet/minecraft/class_8917;field_48717:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
      official d Layz;d:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
  • Constructor Details

    • PriorityIterator

      public PriorityIterator()
  • Method Details

    • enqueue

      public void enqueue(T value, int priority)
      Adds value with the priority priority.
      Mappings:
      Namespace Name Mixin selector
      named enqueue Lnet/minecraft/util/collection/PriorityIterator;enqueue(Ljava/lang/Object;I)V
      intermediary method_54726 Lnet/minecraft/class_8917;method_54726(Ljava/lang/Object;I)V
      official a Layz;a(Ljava/lang/Object;I)V
    • computeNext

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

      private void refreshMaxPriority()
      Mappings:
      Namespace Name Mixin selector
      named refreshMaxPriority Lnet/minecraft/util/collection/PriorityIterator;refreshMaxPriority()V
      intermediary method_56533 Lnet/minecraft/class_8917;method_56533()V
      official a Layz;a()V