Java java.util Queue fields, constructors, methods, implement or subclass

Example usage for Java java.util Queue fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util Queue.

The text is from its open source code.

Subclass

java.util.Queue has subclasses.
Click this link to see all its subclasses.

Implementation

java.util.Queue has the following implementations.
Click this link to see all its implementation.

Method

booleanadd(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.
booleanaddAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation).
voidclear()
Removes all of the elements from this collection (optional operation).
booleancontains(Object o)
Returns true if this collection contains the specified element.
Eelement()
Retrieves, but does not remove, the head of this queue.
voidforEach(Consumer action)
Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.
booleanisEmpty()
Returns true if this collection contains no elements.
Iteratoriterator()
Returns an iterator over the elements in this collection.
booleanoffer(E e)
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.
Epeek()
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
Epoll()
Retrieves and removes the head of this queue, or returns null if this queue is empty.
Eremove()
Retrieves and removes the head of this queue.
booleanremove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
booleanremoveAll(Collection c)
Removes all of this collection's elements that are also contained in the specified collection (optional operation).
intsize()
Returns the number of elements in this collection.
Streamstream()
Returns a sequential Stream with this collection as its source.
T[]toArray(T[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
StringtoString()
Returns a string representation of the object.