org.jboss.messaging.core.list.impl
Class PriorityLinkedListImpl<T>
java.lang.Object
org.jboss.messaging.core.list.impl.PriorityLinkedListImpl<T>
- All Implemented Interfaces:
- java.lang.Iterable<T>, PriorityLinkedList<T>
public class PriorityLinkedListImpl<T>
- extends java.lang.Object
- implements PriorityLinkedList<T>
A priority linked list implementation
It implements this by maintaining an individual LinkedBlockingDeque for each priority level.
- Version:
- $Revision: 1174 $
$Id: BasicPrioritizedDeque.java 1174 2006-08-02 14:14:32Z timfox $
- Author:
- Jeff Mesnil
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PriorityLinkedListImpl
public PriorityLinkedListImpl(int priorities)
addFirst
public void addFirst(T t,
int priority)
- Specified by:
addFirst
in interface PriorityLinkedList<T>
addLast
public void addLast(T t,
int priority)
- Specified by:
addLast
in interface PriorityLinkedList<T>
removeFirst
public T removeFirst()
- Specified by:
removeFirst
in interface PriorityLinkedList<T>
peekFirst
public T peekFirst()
- Specified by:
peekFirst
in interface PriorityLinkedList<T>
getAll
public java.util.List<T> getAll()
- Specified by:
getAll
in interface PriorityLinkedList<T>
clear
public void clear()
- Specified by:
clear
in interface PriorityLinkedList<T>
size
public int size()
- Specified by:
size
in interface PriorityLinkedList<T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface PriorityLinkedList<T>
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<T>
- Specified by:
iterator
in interface PriorityLinkedList<T>
Copyright © 2006 JBoss Inc. All Rights Reserved.