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>
ASorter
orders tests. In general you will not need to use aSorter
directly. Instead, useRequest.sortWith(Comparator)
.- Since:
- 4.0
Constructor Summary
Constructors Constructor Description Sorter(Comparator<Description> comparator)
Creates aSorter
that usescomparator
to sort tests
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Object object)
Sorts the test inrunner
usingcomparator
int
compare(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 aSorter
that usescomparator
to sort tests- Parameters:
comparator
- theComparator
to use when sorting tests
Method Detail
compare
public int compare(Description o1, Description o2)
- Specified by:
compare
in interfaceComparator<Description>