MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / min

Method min

src/main/java/field/utility/Util.java:96–111  ·  view source on GitHub ↗
(Iterable<T> a, Comparator<T> c)

Source from the content-addressed store, hash-verified

94 }
95
96 static public <T> T min(Iterable<T> a, Comparator<T> c) {
97 boolean first = true;
98 T minIs = null;
99
100 for (T t : a) {
101 if (first) {
102 minIs = t;
103 first = false;
104 } else {
105 if (c.compare(minIs, t) > 0) {
106 minIs = t;
107 }
108 }
109 }
110 return minIs;
111 }
112
113 /**
114 * An autoclosable that doesn't throw an exception

Callers 11

diff_commonPrefixMethod · 0.45
diff_commonSuffixMethod · 0.45
diff_commonOverlapMethod · 0.45
match_mainMethod · 0.45
match_bitapMethod · 0.45
patch_addContextMethod · 0.45
patch_applyMethod · 0.45
patch_splitMaxMethod · 0.45
unionMethod · 0.45
intersectionMethod · 0.45
unionMethod · 0.45

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected