edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.core.util
Class PrioritizedList

java.lang.Object
  extended by edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.core.util.PrioritizedList

public class PrioritizedList
extends Object

List that allows items to be added with a priority that will affect the order in which they are later iterated over. Objects with a high priority will appear before objects with a low priority in the list. If two objects of the same priority are added to the list, the most recently added one will be iterated over first. Implementation uses a TreeSet, which has a guaranteed add time of O(log(n)).

Author:
Joe Walnes, Guilherme Silveira

Constructor Summary
PrioritizedList()
           
 
Method Summary
 void add(Object item, int priority)
           
 Iterator iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrioritizedList

public PrioritizedList()
Method Detail

add

public void add(Object item,
                int priority)

iterator

public Iterator iterator()


Copyright © 2012 Internet2. All Rights Reserved.