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

Method log

src/main/java/field/utility/Log.java:32–46  ·  view source on GitHub ↗
(String channel, Supplier<Object> message)

Source from the content-addressed store, hash-verified

30 // Use --------------------------------
31
32 static public void log(String channel, Supplier<Object> message) {
33 boolean found = false;
34 if (earlyFail.getIfPresent(channel) == null) {
35 for (Pair<Pattern, BiConsumer<String, Object>> p : active) {
36 if (p.first.matcher(channel).matches()) {
37 Object m = message.get();
38 if (m != null) p.second.accept(channel, m);
39 found = true;
40 break;
41 }
42 }
43 if (!found) earlyFail.put(channel, channel);
44 }
45 if (!found && _fallthrough != null) _fallthrough.accept(channel, message);
46 }
47
48 // Configure --------------------------------
49

Callers 15

OpenMethod · 0.95
mainMethod · 0.95
button0Method · 0.95
breadthFirstMethod · 0.95
breadthFirstAllMethod · 0.95
getCompletionsForMethod · 0.95
drawMethod · 0.95
call_runnableMethod · 0.95
callMethod · 0.95
offMethod · 0.95
onMethod · 0.95

Calls 4

getMethod · 0.65
acceptMethod · 0.65
matchesMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected