Package org.testng
Interface ListenerComparator
-
- All Superinterfaces:
java.util.Comparator<ITestNGListener>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ListenerComparator extends java.util.Comparator<ITestNGListener>
Listener interface that can be used to determine listener execution order. This interface will NOT be used to determine execution order forIReporter
implementations.An implementation can be plugged into TestNG either via:
TestNG.setListenerComparator(ListenerComparator)
if you are using theTestNG
APIs.- Via the configuration parameter
-listenercomparator
if you are using a build tool
-
-
Method Summary
Static Methods Modifier and Type Method Description static <T extends ITestNGListener>
java.util.Collection<T>sort(java.util.Collection<T> list, ListenerComparator comparator)
static <T extends ITestNGListener>
java.util.List<T>sort(java.util.List<T> list, ListenerComparator comparator)
-
-
-
Method Detail
-
sort
static <T extends ITestNGListener> java.util.List<T> sort(java.util.List<T> list, ListenerComparator comparator)
-
sort
static <T extends ITestNGListener> java.util.Collection<T> sort(java.util.Collection<T> list, ListenerComparator comparator)
-
-