org.jboss.seam.util
Class Sorter<T>

java.lang.Object
  extended by org.jboss.seam.util.Sorter<T>

public abstract class Sorter<T>
extends Object

Uses a brute force O(n^4) algorithm to discover an acceptable order for partially ordered elements where the transitivity of the ordering is not known in advance. Of course, this should only be used to order small numbers of elements.

Author:
Gavin King

Constructor Summary
Sorter()
           
 
Method Summary
protected abstract  boolean isOrderViolated(T outside, T inside)
           
 void sort(List<T> originalList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sorter

public Sorter()
Method Detail

sort

public void sort(List<T> originalList)

isOrderViolated

protected abstract boolean isOrderViolated(T outside,
                                           T inside)