public interface Queue<T> extends QueueKernel<T>, java.lang.Iterable<T>
QueueKernel
interface. All method implementations must, by design,
use only the QueueKernel methods to perform operations on the component.Modifier and Type | Method and Description |
---|---|
void |
append(java.util.Collection<T> collection)
Appends the entries in
collection to the end of this . |
void |
append(Queue<T> collection)
Appends the entries in
collection to the end of this . |
boolean |
contains(T entry)
Reports whether
entry is in this . |
void |
flip()
Reverses the order of the entries in
this . |
void |
sort(java.util.Comparator<T> comparator)
Sorts the entries in
this according to the order provided by
comparator . |
dequeue, enqueue, front, length, replaceFront
clear, newInstance, transferFrom
void flip()
this
.void append(java.util.Collection<T> collection)
collection
to the end of this
.collection
- collections whose entries will be appended to thisvoid append(Queue<T> collection)
collection
to the end of this
.collection
- collections whose entries will be appended to thisvoid sort(java.util.Comparator<T> comparator)
this
according to the order provided by
comparator
.comparator
- ordering to be imposed on #thisboolean contains(T entry)
entry
is in this
.entry
- entry to be looked for