org.browsecode.helpers.menus
Class Order<T>

java.lang.Object
  extended by org.browsecode.helpers.menus.Order<T>

public class Order<T>
extends java.lang.Object


Field Summary
static java.lang.String ALL_OTHER_ITEMS
           
 
Constructor Summary
Order(java.util.Comparator<T> comparator, java.util.Vector<T> order)
          We guarantee that Comparator.compare() will always be called like this: Comparator.compare([itemToInsert or item already inserted], item from getOrder()) -- to make your implementation life easier.
 
Method Summary
 int getInsertIndex(java.util.Vector<T> insertInto, T insertItem)
           
 java.util.Vector getOrder()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_OTHER_ITEMS

public static final java.lang.String ALL_OTHER_ITEMS
See Also:
Constant Field Values
Constructor Detail

Order

public Order(java.util.Comparator<T> comparator,
             java.util.Vector<T> order)
We guarantee that Comparator.compare() will always be called like this: Comparator.compare([itemToInsert or item already inserted], item from getOrder()) -- to make your implementation life easier.

Parameters:
comparator -
order -
Method Detail

getOrder

public java.util.Vector getOrder()

getInsertIndex

public int getInsertIndex(java.util.Vector<T> insertInto,
                          T insertItem)