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

Method get

src/main/java/fieldbox/boxes/plugins/BoxRef.java:29–37  ·  view source on GitHub ↗
(Box from)

Source from the content-addressed store, hash-verified

27
28 }
29
30 public Box get(Box from) {
31 if (ref != null) {
32 if (ref.disconnected) return ref = null;
33 return ref;
34 }
35 Optional<Box> b = from.breadthFirst(from.both()).filter(x -> Util.safeEq(x.properties.get(IO.id), uuid)).findFirst();
36 if (b.isPresent()) ref = b.get();
37 return ref;
38 }
39
40 private void writeObject(ObjectOutputStream out) throws IOException {

Callers

nothing calls this directly

Calls 5

safeEqMethod · 0.95
breadthFirstMethod · 0.80
isPresentMethod · 0.80
getMethod · 0.65
bothMethod · 0.45

Tested by

no test coverage detected