MCPcopy Create free account
hub / github.com/Neop/mudmap2 / insert

Method insert

src/main/java/mudmap2/backend/prquadtree/Quadtree.java:100–105  ·  view source on GitHub ↗

Inserts obj at x, y @param obj @param x @param y @throws Exception throws an exception, if the element couldn't be inserted

(T obj, int x, int y)

Source from the content-addressed store, hash-verified

98 * @throws Exception throws an exception, if the element couldn't be inserted
99 */
100 public void insert(T obj, int x, int y) throws Exception{
101 if(root == null){
102 root = new QuadtreeNode(null, x, y, DEFAULT_LENGTH);
103 }
104 root.insert(new QuadtreeLeaf(obj, x, y));
105 }
106
107 /**
108 * Removes el from the quadtree

Callers 8

testIsEmptyMethod · 0.95
testInsertMethod · 0.95
testMoveMethod · 0.95
testValuesMethod · 0.95
moveMethod · 0.95
putMethod · 0.45
insertMethod · 0.45

Calls

no outgoing calls

Tested by 5

testIsEmptyMethod · 0.76
testInsertMethod · 0.76
testMoveMethod · 0.76
testValuesMethod · 0.76