public class PriorityLinkedListImpl<T> extends Object implements PriorityLinkedList<T>
It implements this by maintaining an individual LinkedBlockingDeque for each priority level.
| Modifier and Type | Field and Description |
|---|---|
protected LinkedListImpl<T>[] |
levels |
| Constructor and Description |
|---|
PriorityLinkedListImpl(int priorities) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHead(T t,
int priority) |
void |
addTail(T t,
int priority) |
void |
clear() |
boolean |
isEmpty() |
LinkedListIterator<T> |
iterator() |
T |
poll() |
int |
size() |
protected LinkedListImpl<T>[] levels
public void addHead(T t, int priority)
addHead in interface PriorityLinkedList<T>public void addTail(T t, int priority)
addTail in interface PriorityLinkedList<T>public T poll()
poll in interface PriorityLinkedList<T>public void clear()
clear in interface PriorityLinkedList<T>public int size()
size in interface PriorityLinkedList<T>public boolean isEmpty()
isEmpty in interface PriorityLinkedList<T>public LinkedListIterator<T> iterator()
iterator in interface PriorityLinkedList<T>Copyright © 2018 JBoss by Red Hat. All rights reserved.