Package jenkins.branch
Class DescriptorOrder<T extends Describable<T>>
java.lang.Object
jenkins.branch.DescriptorOrder<T>
- Type Parameters:
T- the type ofDescribable.
- All Implemented Interfaces:
Comparator<T>
A
Comparator that compares Describable instances of a specific type based
on the order of their
Descriptors in Jenkins's list of Descriptors for
that type.-
Method Summary
Modifier and TypeMethodDescriptionintstatic <T extends Describable<T>>
Comparator<T>Returns aComparatorthat matches the order of the correspondingJenkins.getDescriptorList(Class).static <T extends Describable<T>>
Comparator<T>Returns aComparatorthat reverses the order of the correspondingJenkins.getDescriptorList(Class).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
forward
Returns aComparatorthat matches the order of the correspondingJenkins.getDescriptorList(Class).- Type Parameters:
T- the type ofDescribable.- Parameters:
type- the type ofDescribable.- Returns:
- a
Comparator.
-
reverse
Returns aComparatorthat reverses the order of the correspondingJenkins.getDescriptorList(Class).- Type Parameters:
T- the type ofDescribable.- Parameters:
type- the type ofDescribable.- Returns:
- a
Comparator.
-
compare
- Specified by:
comparein interfaceComparator<T extends Describable<T>>
-