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

Method connect

src/main/java/fieldbox/boxes/Box.java:121–137  ·  view source on GitHub ↗

Connect box 'b' to this box. b is now a child of this box, this box is now a parent of 'b'

(Box b)

Source from the content-addressed store, hash-verified

119
120 /**
121 * Connect box 'b' to this box. b is now a child of this box, this box is now a parent of 'b'
122 */
123 public Box connect(Box b) {
124 if (children.add(b)) all.addLast(b);
125 else {
126 // restore ordering to LinkedHashSet
127 children.remove(b);
128 children.add(b);
129 }
130
131 if (b.parents.add(this)) b.all.addFirst(this);
132 else {
133 // restore ordering to LinkedHashSet
134 b.parents.remove(this);
135 b.parents.add(this);
136 }
137
138 return this;
139 }
140

Callers 15

DefaultMenusMethod · 0.95
newBoxPairMethod · 0.95
runMethod · 0.95
duplicateGroupMethod · 0.95
collapseMethod · 0.95
isolateContentsMethod · 0.95
integrateContentsMethod · 0.95
activeatePluginMethod · 0.95
_loadBoxMethod · 0.95
readDocumentMethod · 0.95
OpenMethod · 0.45
newBoxMethod · 0.45

Calls 2

addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected