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

Method doOutput

src/main/java/fielded/plugins/Out.java:295–333  ·  view source on GitHub ↗
(Object x, boolean append)

Source from the content-addressed store, hash-verified

293 return this.breadthFirst(this.both())
294 .filter(x -> x.properties.has(IO.id))
295 .filter(x -> x.properties.get(IO.id)
296 .equals(uid))
297 .findFirst()
298 .orElse(null);
299 }
300
301 private String safe(String s) {
302 return s.trim()
303 .replaceAll(" ", "_")
304 .replaceAll("\n", "_");
305 }
306
307 Pattern stuff = Pattern.compile("([+-]?(\\d+\\.)?\\d+)|([\\%\\$\\#\\@\\!\\^\\&\\(\\)\\[\\]\\{\\}\\'\\,\\.\\;\\:\\+\\-\\*])");
308
309 private String cheapSynax(String s) {
310 return s;
311 }
312
313 private String shorten(Class c) {
314 String nn = c.getName();
315 String[] p = nn.split("[\\.\\$]");
316 String shor = p[p.length - 1];
317
318 if (shor.equalsIgnoreCase("ScriptObjectMirror")) return "Object";
319
320 return shor;
321 }
322
323 public Out setWriter(Writer theWriter, Consumer<Triple<Box, Integer, Boolean>> lineNumber) {
324 this.theWriter = theWriter;
325 this.theLineOut = lineNumber;
326 return this;
327 }
328
329 public Consumer<Triple<Box, Integer, Boolean>> getLineOut() {
330 return theLineOut;
331 }
332
333 public Writer getWriter() {
334 return theWriter;
335 }
336

Callers 1

OutMethod · 0.95

Calls 6

findMethod · 0.95
convertMethod · 0.95
getLineNumberMethod · 0.65
acceptMethod · 0.65
printlnMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected