org.jboss.messaging.core.list.impl
Class PriorityLinkedListImpl<T>

java.lang.Object
  extended by org.jboss.messaging.core.list.impl.PriorityLinkedListImpl<T>
All Implemented Interfaces:
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 LinkedList for each priority level.

Version:
$Revision: 1174 $ $Id: BasicPrioritizedDeque.java 1174 2006-08-02 14:14:32Z timfox $
Author:
Constructor Summary
PriorityLinkedListImpl(int priorities)
           
 
Method Summary
 void addFirst(T t, int priority)
           
 void addLast(T t, int priority)
           
 void clear()
           
 java.util.List<T> getAll()
           
 boolean isEmpty()
           
 java.util.ListIterator<T> iterator()
           
 T peekFirst()
           
 void remove(T messageReference, int priority)
           
 T removeFirst()
           
 T removeLast()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityLinkedListImpl

public PriorityLinkedListImpl(int priorities)
Method Detail

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>

removeLast

public T removeLast()
Specified by:
removeLast 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>

remove

public void remove(T messageReference,
                   int priority)
Specified by:
remove in interface PriorityLinkedList<T>

iterator

public java.util.ListIterator<T> iterator()
Specified by:
iterator in interface PriorityLinkedList<T>


Copyright © 2006 JBoss Inc. All Rights Reserved.