MCPcopy Index your code
hub / github.com/arduino/Arduino / compare

Method compare

arduino-core/src/processing/app/Sketch.java:35–42  ·  view source on GitHub ↗
(SketchFile x, SketchFile y)

Source from the content-addressed store, hash-verified

33
34 public static final Comparator<SketchFile> CODE_DOCS_COMPARATOR = new Comparator<SketchFile>() {
35 @Override
36 public int compare(SketchFile x, SketchFile y) {
37 if (x.isPrimary() && !y.isPrimary())
38 return -1;
39 if (y.isPrimary() && !x.isPrimary())
40 return 1;
41 return x.getFileName().compareTo(y.getFileName());
42 }
43 };
44
45 /**

Callers

nothing calls this directly

Calls 3

isPrimaryMethod · 0.80
compareToMethod · 0.80
getFileNameMethod · 0.80

Tested by

no test coverage detected