Class AbstractPushStreamImpl.ArrayQueue<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.Queue<E>
    Enclosing class:
    AbstractPushStreamImpl<T>

    private static class AbstractPushStreamImpl.ArrayQueue<E>
    extends java.util.AbstractQueue<E>
    implements java.util.Queue<E>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int nextIndex  
      (package private) int normalLength  
      (package private) int size  
      (package private) java.lang.Object[] store  
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayQueue​(int capacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forcePush​(E e)  
      java.util.Iterator<E> iterator()  
      boolean offer​(E e)  
      E peek()  
      E poll()  
      int size()  
      • Methods inherited from class java.util.AbstractQueue

        add, addAll, clear, element, remove
      • Methods inherited from class java.util.AbstractCollection

        contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Queue

        add, element, remove
    • Field Detail

      • store

        final java.lang.Object[] store
      • normalLength

        int normalLength
      • nextIndex

        int nextIndex
      • size

        int size
    • Constructor Detail

      • ArrayQueue

        ArrayQueue​(int capacity)
    • Method Detail

      • offer

        public boolean offer​(E e)
        Specified by:
        offer in interface java.util.Queue<E>
      • forcePush

        public void forcePush​(E e)
      • poll

        public E poll()
        Specified by:
        poll in interface java.util.Queue<E>
      • peek

        public E peek()
        Specified by:
        peek in interface java.util.Queue<E>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in class java.util.AbstractCollection<E>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in class java.util.AbstractCollection<E>