org.apache.activemq.apollo.util
Class PriorityLinkedList<E extends LinkedNode<E>>
java.lang.Object
org.apache.activemq.apollo.util.PriorityLinkedList<E>
public class PriorityLinkedList<E extends LinkedNode<E>>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PriorityLinkedList
public PriorityLinkedList(int numPriorities)
PriorityLinkedList
public PriorityLinkedList(int numPriorities,
Mapper<java.lang.Integer,E> priorityMapper)
getHighestPriority
public final int getHighestPriority()
poll
public final E poll()
- Gets the element at the front of the list:
- Returns:
isEmpty
public final boolean isEmpty()
peek
public final E peek()
- Gets the element at the front of the list:
- Returns:
add
public final void add(E element)
add
public final void add(E element,
int prio)
getPriorityMapper
public Mapper<java.lang.Integer,E> getPriorityMapper()
setPriorityMapper
public void setPriorityMapper(Mapper<java.lang.Integer,E> priorityMapper)
Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.