Package org.junit.runner.manipulation
Class Sorter
- java.lang.Object
-
- org.junit.runner.manipulation.Sorter
-
- All Implemented Interfaces:
Comparator<Description>
public class Sorter extends Object implements Comparator<Description>
ASorterorders tests. In general you will not need to use aSorterdirectly. Instead, useRequest.sortWith(Comparator).- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description Sorter(Comparator<Description> comparator)Creates aSorterthat usescomparatorto sort tests
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Object object)Sorts the test inrunnerusingcomparatorintcompare(Description o1, Description o2)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
Sorter
public Sorter(Comparator<Description> comparator)
Creates aSorterthat usescomparatorto sort tests- Parameters:
comparator- theComparatorto use when sorting tests
-
-
Method Detail
-
compare
public int compare(Description o1, Description o2)
- Specified by:
comparein interfaceComparator<Description>
-
-