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

Method exportAsCommand

src/main/java/fielded/Commands.java:152–160  ·  view source on GitHub ↗
(Box inside, Runnable r, String name, String doc)

Source from the content-addressed store, hash-verified

150 }
151
152 static public void exportAsCommand(Box inside, Runnable r, String name, String doc) {
153 inside.properties.getOrConstruct(command)
154 .put(name, (FunctionOfBox) (x) -> {
155 r.run();
156 return null;
157 });
158 inside.properties.getOrConstruct(commandDoc)
159 .put(name, doc);
160 }
161
162 static public void exportAsCommand(Box inside, Runnable r, FunctionOfBox<Boolean> guard, String name, String doc) {
163 inside.properties.getOrConstruct(command)

Callers 1

PresentationModeMethod · 0.95

Calls 3

putMethod · 0.45
getOrConstructMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected