MCPcopy Create free account
hub / github.com/grpc/grpc-java / compare

Method compare

api/src/main/java/io/grpc/ServiceProviders.java:82–89  ·  view source on GitHub ↗
(T f1, T f2)

Source from the content-addressed store, hash-verified

80 // get a reliable result.
81 Collections.sort(list, Collections.reverseOrder(new Comparator<T>() {
82 @Override
83 public int compare(T f1, T f2) {
84 int pd = priorityAccessor.getPriority(f1) - priorityAccessor.getPriority(f2);
85 if (pd != 0) {
86 return pd;
87 }
88 return f1.getClass().getName().compareTo(f2.getClass().getName());
89 }
90 }));
91 return Collections.unmodifiableList(list);
92 }

Callers

nothing calls this directly

Calls 3

getPriorityMethod · 0.65
getNameMethod · 0.65
compareToMethod · 0.45

Tested by

no test coverage detected