public class Sorter extends Object implements Comparator<Description>
Sorter
orders tests. In general you will not need
to use a Sorter
directly. Instead, use Request.sortWith(Comparator)
.Modifier and Type | Field and Description |
---|---|
static Sorter |
NULL
NULL is a
Sorter that leaves elements in an undefined order |
Constructor and Description |
---|
Sorter(Comparator<Description> comparator)
Creates a
Sorter that uses comparator
to sort tests |
Modifier and Type | Method and Description |
---|---|
void |
apply(Object object)
Sorts the test in
runner using comparator |
int |
compare(Description o1,
Description o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final Sorter NULL
Sorter
that leaves elements in an undefined orderpublic Sorter(Comparator<Description> comparator)
Sorter
that uses comparator
to sort testscomparator
- the Comparator
to use when sorting testspublic void apply(Object object)
runner
using comparator
public int compare(Description o1, Description o2)
compare
in interface Comparator<Description>
Copyright © 2002–2016 JUnit. All rights reserved.