File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\matrix\NoopMatrixConfigurationSorter.java.html

1 package hudson.matrix;
2
3 import hudson.Extension;
4 import hudson.util.FormValidation;
5 import org.kohsuke.stapler.DataBoundConstructor;
6
7 /**
8 * Place holder for default "do not sort" {@link MatrixConfigurationSorter}.
9 *
10 * @author Kohsuke Kawaguchi
11 */
12 public class NoopMatrixConfigurationSorter extends MatrixConfigurationSorter {
13 @DataBoundConstructor
14 public NoopMatrixConfigurationSorter() {
15 }
16
17 @Override
18 public void validate(MatrixProject p) throws FormValidation {
19 // nothing
20 }
21
22 public int compare(MatrixConfiguration o1, MatrixConfiguration o2) {
23 return o1.getDisplayName().compareTo(o2.getDisplayName());
24 }
25
26 @Extension(ordinal=100) // this is the default
27 public static class DescriptorImpl extends MatrixConfigurationSorterDescriptor {
28 @Override
29 public String getDisplayName() {
30 return "Doesn't care";
31 }
32 }
33 }
34