类 Sorter
- java.lang.Object
- org.junit.runner.manipulation.Sorter
- 所有已实现的接口:
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)
.- 从以下版本开始:
- 4.0
构造器概要
构造器 构造器 说明 Sorter(Comparator<Description> comparator)
Creates aSorter
that usescomparator
to sort tests
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
apply(Object object)
Sorts the test inrunner
usingcomparator
int
compare(Description o1, Description o2)
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
构造器详细资料
Sorter
public Sorter(Comparator<Description> comparator)
Creates aSorter
that usescomparator
to sort tests- 参数:
comparator
- theComparator
to use when sorting tests
方法详细资料
compare
public int compare(Description o1, Description o2)
- 指定者:
compare
在接口中Comparator<Description>