| 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 | |