public class SimpleQueue<T> extends AbstractQueue<T>
Modifier and Type | Field and Description |
---|---|
protected LinkedList<T> |
list |
Constructor and Description |
---|
SimpleQueue() |
SimpleQueue(int initializeCapacity) |
Modifier and Type | Method and Description |
---|---|
Iterator<T> |
iterator() |
boolean |
offer(T e) |
T |
peek() |
T |
poll() |
int |
size() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
protected final LinkedList<T> list
public SimpleQueue(int initializeCapacity)
public SimpleQueue()
public boolean offer(T e)
public T peek()
public T poll()
public Iterator<T> iterator()
iterator
in interface Iterable<T>
iterator
in interface Collection<T>
iterator
in class AbstractCollection<T>
public int size()
size
in interface Collection<T>
size
in class AbstractCollection<T>
Copyright © 2021. All rights reserved.