Class UnmodifiableQueue<E>

    • Method Detail

      • unmodifiableQueue

        public static <E> Queue<E> unmodifiableQueue(Queue<? extends E> queue)
        Factory method to create an unmodifiable queue.

        If the queue passed in is already unmodifiable, it is returned.

        Type Parameters:
        E - the type of the elements in the queue
        Parameters:
        queue - the queue to decorate, must not be null
        Returns:
        an unmodifiable Queue
        Throws:
        NullPointerException - if queue is null
      • add

        public boolean add(Object object)
      • addAll

        public boolean addAll(Collection<? extends E> coll)
      • clear

        public void clear()
      • remove

        public boolean remove(Object object)
      • removeAll

        public boolean removeAll(Collection<?> coll)
      • retainAll

        public boolean retainAll(Collection<?> coll)
      • offer

        public boolean offer(E obj)
      • poll

        public E poll()
      • remove

        public E remove()