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
Descriptor
s in Jenkins
's list of Descriptor
s for
that type.-
Method Summary
Modifier and TypeMethodDescriptionint
static <T extends Describable<T>>
Comparator<T>Returns aComparator
that matches the order of the correspondingJenkins.getDescriptorList(Class)
.static <T extends Describable<T>>
Comparator<T>Returns aComparator
that 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, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
forward
Returns aComparator
that matches the order of the correspondingJenkins.getDescriptorList(Class)
.- Type Parameters:
T
- the type ofDescribable
.- Parameters:
type
- the type ofDescribable
.- Returns:
- a
Comparator
.
-
reverse
Returns aComparator
that 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:
compare
in interfaceComparator<T extends Describable<T>>
-