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

Method loadTopology

src/main/java/fieldbox/io/Raft.java:78–109  ·  view source on GitHub ↗
(Group g, Box root, Function<String, Box> alias)

Source from the content-addressed store, hash-verified

76 }
77
78 public List<Box> loadTopology(Group g, Box root, Function<String, Box> alias) {
79
80 // policy for checking / merging based on UID
81
82 insideLoad.clear();
83
84 Function<String, Box> aalias = x -> {
85 Box q = alias.apply(x);
86 if (q!=null) return q;
87 if (x.equals(">>root<<")) return root;
88 return null;
89 };
90
91
92 for(Node n : g.nodes)
93 {
94 try {
95 insideLoad.put(n, _loadBox(n, aalias, node -> true));
96 } catch (InstantiationException e) {
97 e.printStackTrace();
98 } catch (IllegalAccessException e) {
99 e.printStackTrace();
100 } catch (IOException e) {
101 e.printStackTrace();
102 } catch (ClassNotFoundException e) {
103 e.printStackTrace();
104 }
105 }
106
107 return new ArrayList<>(insideLoad.values());
108
109 }
110
111
112

Callers

nothing calls this directly

Calls 5

_loadBoxMethod · 0.95
applyMethod · 0.65
clearMethod · 0.45
equalsMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected