Modifier and Type | Method and Description |
---|---|
int |
capacity() |
T |
element()
Peek at the first item at the front end.
|
boolean |
empty() |
boolean |
offer(T item)
Offer the item into this Queue at the rear end.
|
T |
peek()
Peek at the first item at the front end.
|
T |
poll()
Remove the item at the front end.
|
T |
remove()
Remove the item from the Queue at the front end.
|
int |
size() |
boolean offer(T item)
item
- of the same typeT remove() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if no item to be removed.T poll()
T peek()
T element() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if this Queue is empty.boolean empty()
int size()
int capacity()