| 362 | } |
| 363 | |
| 364 | static public class WithID implements AsMap { |
| 365 | |
| 366 | private final Box on; |
| 367 | |
| 368 | public WithID(Box on) { |
| 369 | this.on = on; |
| 370 | } |
| 371 | |
| 372 | @Override |
| 373 | public boolean asMap_isProperty(String s) { |
| 374 | return true; |
| 375 | } |
| 376 | |
| 377 | @Override |
| 378 | public Object asMap_call(Object o, Object o1) { |
| 379 | return asMap_getElement(o1); |
| 380 | } |
| 381 | |
| 382 | @Override |
| 383 | public Object asMap_getElement(Object element) { |
| 384 | return asMap_get(element + ""); |
| 385 | } |
| 386 | |
| 387 | @Override |
| 388 | public Object asMap_setElement(int element, Object o) { |
| 389 | return null; |
| 390 | } |
| 391 | |
| 392 | @Override |
| 393 | public Object asMap_get(String p) { |
| 394 | return on.breadthFirst(on.downwards()) |
| 395 | .filter(x -> x.properties.has(IO.id)) |
| 396 | .filter(x -> x.properties.get(IO.id) |
| 397 | .matches(p)) |
| 398 | .findFirst().orElse(null); |
| 399 | } |
| 400 | |
| 401 | @Override |
| 402 | public Object asMap_set(String p, Object val) { |
| 403 | return null; |
| 404 | } |
| 405 | |
| 406 | |
| 407 | @Override |
| 408 | public Object asMap_new(Object a) { |
| 409 | return null; |
| 410 | } |
| 411 | |
| 412 | @Override |
| 413 | public Object asMap_new(Object a, Object b) { |
| 414 | return null; |
| 415 | } |
| 416 | |
| 417 | @Override |
| 418 | public Object asMap_getElement(int element) { |
| 419 | return asMap_get("" + element); |
| 420 | } |
| 421 |
nothing calls this directly
no outgoing calls
no test coverage detected