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

Method asMap_get

src/main/java/fieldbox/boxes/plugins/Pseudo.java:738–752  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

736
737
738 @Override
739 public Object asMap_get(String s) {
740 Dict.Prop<?> p = new Dict.Prop(s);
741
742 for (Box b : on.parents()) {
743 Optional<?> q = b.breadthFirst(b.upwards())
744 .filter(x -> x.properties.has(p))
745 .map(x -> x.properties.get(p))
746 .findFirst();
747
748 if (q.isPresent()) return q.get();
749 }
750
751 return null;
752 }
753
754 }
755

Callers

nothing calls this directly

Calls 7

parentsMethod · 0.80
breadthFirstMethod · 0.80
upwardsMethod · 0.80
isPresentMethod · 0.80
getMethod · 0.65
mapMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected