Type Parameters:
E - the type of elements held in this queue
All Superinterfaces:
Collection<E>, Iterable<E>
All Known Subinterfaces:
BlockingDeque<E>, BlockingQueue<E>, Deque<E>, TransferQueue<E>
All Known Implementing Classes:
AbstractQueue, ArrayBlockingQueue, ArrayDeque, ConcurrentLinkedDeque, ConcurrentLinkedQueue, DelayQueue, LinkedBlockingDeque, LinkedBlockingQueue, LinkedList, LinkedTransferQueue, PriorityBlockingQueue, PriorityQueue, SynchronousQueue

  • Method Summary

    boolean

    add(E e)

    Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.

    element()

    Retrieves, but does not remove, the head of this queue.

    boolean

    offer(E e)

    Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.

    peek()

    Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.

    poll()

    Retrieves and removes the head of this queue, or returns null if this queue is empty.

    remove()

    Retrieves and removes the head of this queue.

  • Method Details

    • add

    • offer

    • remove

    • poll

    • element

    • peek