Modifier and Type Method and Description
boolean [**add**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#add-E->)([**E**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html>) 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.
E [**element**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#element-->)()Retrieves, but does not remove, the head of this queue.
boolean [**offer**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#offer-E->)([**E**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html>) e)Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.
E [**peek**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#peek-->)()Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
E [**poll**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#poll-->)()Retrieves and removes the head of this queue, or returns null if this queue is empty.
E [**remove**](<https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html#remove-->)()Retrieves and removes the head of this queue.