Class ArrayListDeque<T>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
net.minecraft.util.ArrayListDeque<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, Deque<T>, List<T>, Queue<T>, RandomAccess

public class ArrayListDeque<T> extends AbstractList<T> implements Serializable, Cloneable, Deque<T>, RandomAccess
See Also:
  • Field Details

    • MIN_GROWTH

      private static final int MIN_GROWTH
      See Also:
    • contents

      private Object[] contents
    • size

      private int size
  • Constructor Details

    • ArrayListDeque

      public ArrayListDeque()
    • ArrayListDeque

      public ArrayListDeque(int p_299918_)
  • Method Details

    • size

      public int size()
      Specified by:
      size in interface Collection<T>
      Specified by:
      size in interface Deque<T>
      Specified by:
      size in interface List<T>
      Specified by:
      size in class AbstractCollection<T>
    • capacity

      public int capacity()
    • getIndex

      private int getIndex(int p_299728_)
    • get

      public T get(int p_300499_)
      Specified by:
      get in interface List<T>
      Specified by:
      get in class AbstractList<T>
    • verifyIndexInRange

      private static void verifyIndexInRange(int p_299791_, int p_299333_)
    • verifyIndexInRange

      private void verifyIndexInRange(int p_298701_)
    • getInner

      private T getInner(int p_299306_)
    • set

      public T set(int p_300259_, T p_298094_)
      Specified by:
      set in interface List<T>
      Overrides:
      set in class AbstractList<T>
    • add

      public void add(int p_301285_, T p_300734_)
      Specified by:
      add in interface List<T>
      Overrides:
      add in class AbstractList<T>
    • grow

      private void grow()
    • remove

      public T remove(int p_297670_)
      Specified by:
      remove in interface List<T>
      Overrides:
      remove in class AbstractList<T>
    • removeIf

      public boolean removeIf(Predicate<? super T> p_300785_)
      Specified by:
      removeIf in interface Collection<T>
    • copyCount

      private void copyCount(Object[] p_300471_, int p_298513_)
    • replaceAll

      public void replaceAll(UnaryOperator<T> p_299491_)
      Specified by:
      replaceAll in interface List<T>
    • forEach

      public void forEach(Consumer<? super T> p_297273_)
      Specified by:
      forEach in interface Iterable<T>
    • addFirst

      public void addFirst(T p_300853_)
      Specified by:
      addFirst in interface Deque<T>
    • addLast

      public void addLast(T p_301090_)
      Specified by:
      addLast in interface Deque<T>
    • offerFirst

      public boolean offerFirst(T p_300075_)
      Specified by:
      offerFirst in interface Deque<T>
    • offerLast

      public boolean offerLast(T p_300597_)
      Specified by:
      offerLast in interface Deque<T>
    • removeFirst

      public T removeFirst()
      Specified by:
      removeFirst in interface Deque<T>
    • removeLast

      public T removeLast()
      Specified by:
      removeLast in interface Deque<T>
    • pollFirst

      @Nullable public T pollFirst()
      Specified by:
      pollFirst in interface Deque<T>
    • pollLast

      @Nullable public T pollLast()
      Specified by:
      pollLast in interface Deque<T>
    • getFirst

      public T getFirst()
      Specified by:
      getFirst in interface Deque<T>
    • getLast

      public T getLast()
      Specified by:
      getLast in interface Deque<T>
    • peekFirst

      @Nullable public T peekFirst()
      Specified by:
      peekFirst in interface Deque<T>
    • peekLast

      @Nullable public T peekLast()
      Specified by:
      peekLast in interface Deque<T>
    • removeFirstOccurrence

      public boolean removeFirstOccurrence(Object p_300960_)
      Specified by:
      removeFirstOccurrence in interface Deque<T>
    • removeLastOccurrence

      public boolean removeLastOccurrence(Object p_297293_)
      Specified by:
      removeLastOccurrence in interface Deque<T>
    • offer

      public boolean offer(T p_299376_)
      Specified by:
      offer in interface Deque<T>
      Specified by:
      offer in interface Queue<T>
    • remove

      public T remove()
      Specified by:
      remove in interface Deque<T>
      Specified by:
      remove in interface Queue<T>
    • poll

      @Nullable public T poll()
      Specified by:
      poll in interface Deque<T>
      Specified by:
      poll in interface Queue<T>
    • element

      public T element()
      Specified by:
      element in interface Deque<T>
      Specified by:
      element in interface Queue<T>
    • peek

      @Nullable public T peek()
      Specified by:
      peek in interface Deque<T>
      Specified by:
      peek in interface Queue<T>
    • push

      public void push(T p_298076_)
      Specified by:
      push in interface Deque<T>
    • pop

      public T pop()
      Specified by:
      pop in interface Deque<T>
    • descendingIterator

      public Iterator<T> descendingIterator()
      Specified by:
      descendingIterator in interface Deque<T>