test_class.declarator: log = LoggerFactory.getLogger(RTreeTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger log = LoggerFactory.getLogger(RTreeTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.declarator: splitterContext =
        SplitterContext.of(new RStarLeafSplitter(), new RStarSplitter())
test_class.original_string: SplitterContext<String> splitterContext =
        SplitterContext.of(new RStarLeafSplitter(), new RStarSplitter());
test_class.type: SplitterContext<String>
test_class.var_name: splitterContext
test_class.declarator: rTree
test_class.modifier: private
test_class.original_string: private RTree<String> rTree;
test_class.type: RTree<String>
test_class.var_name: rTree
test_class.declarator: r1
test_class.modifier: private
test_class.original_string: private Rectangle2D r1;
test_class.type: Rectangle2D
test_class.var_name: r1
test_class.declarator: r2
test_class.modifier: private
test_class.original_string: private Rectangle2D r2;
test_class.type: Rectangle2D
test_class.var_name: r2
test_class.declarator: r3
test_class.modifier: private
test_class.original_string: private Rectangle2D r3;
test_class.type: Rectangle2D
test_class.var_name: r3
test_class.declarator: r4
test_class.modifier: private
test_class.original_string: private Rectangle2D r4;
test_class.type: Rectangle2D
test_class.var_name: r4
test_class.declarator: r5
test_class.modifier: private
test_class.original_string: private Rectangle2D r5;
test_class.type: Rectangle2D
test_class.var_name: r5
test_class.declarator: r6
test_class.modifier: private
test_class.original_string: private Rectangle2D r6;
test_class.type: Rectangle2D
test_class.var_name: r6
test_class.declarator: r7
test_class.modifier: private
test_class.original_string: private Rectangle2D r7;
test_class.type: Rectangle2D
test_class.var_name: r7
test_class.declarator: r8
test_class.modifier: private
test_class.original_string: private Rectangle2D r8;
test_class.type: Rectangle2D
test_class.var_name: r8
test_class.declarator: linkedMap = Maps.newLinkedHashMap()
test_class.original_string: Map<String, Rectangle2D> linkedMap = Maps.newLinkedHashMap();
test_class.type: Map<String, Rectangle2D>
test_class.var_name: linkedMap
test_class.declarator: CLOSE_ENOUGH = 0.001
test_class.modifier: private final
test_class.original_string: private final double CLOSE_ENOUGH = 0.001;
test_class.type: double
test_class.var_name: CLOSE_ENOUGH
test_class.file: jung-visualization/src/test/java/edu/uci/ics/jung/visualization/spatial/rtree/RTreeTest.java
test_class.identifier: RTreeTest
test_case.body: @Test
    public void testAddFour() {
      rTree = rTree.add(splitterContext, "A", r1);
      rTree = rTree.add(splitterContext, "B", r2);
      rTree = rTree.add(splitterContext, "C", r3);
      rTree = rTree.add(splitterContext, "D", r4);
  
      testAreas(rTree);
    }
test_case.class_method_signature: RTreeTest.testAddFour()
test_case.full_signature: @Test public void testAddFour()
test_case.identifier: testAddFour
test_case.invocations: add add add add testAreas
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddFour()
focal_class.declarator: log = LoggerFactory.getLogger(RTree.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(RTree.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: root
focal_class.modifier: private final
focal_class.original_string: private final Optional<Node<T>> root;
focal_class.type: Optional<Node<T>>
focal_class.var_name: root
focal_class.declarator: marginIncrement = "   "
focal_class.modifier: private static final
focal_class.original_string: private static final String marginIncrement = "   ";
focal_class.type: String
focal_class.var_name: marginIncrement
focal_class.file: jung-visualization/src/main/java/edu/uci/ics/jung/visualization/spatial/rtree/RTree.java
focal_class.identifier: RTree
focal_class.class_method_signature: RTree.getRoot()
focal_class.full_signature: public Optional<Node<T>> getRoot()
focal_class.identifier: getRoot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Optional<Node<T>>
focal_class.signature: Optional<Node<T>> getRoot()
focal_class.class_method_signature: RTree.RTree()
focal_class.full_signature: private  RTree()
focal_class.identifier: RTree
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  RTree()
focal_class.class_method_signature: RTree.RTree(Node<T> node)
focal_class.full_signature: private  RTree(Node<T> node)
focal_class.identifier: RTree
focal_class.modifiers: private
focal_class.parameters: (Node<T> node)
focal_class.signature:  RTree(Node<T> node)
focal_class.class_method_signature: RTree.create()
focal_class.full_signature: public static RTree<T> create()
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: RTree<T>
focal_class.signature: RTree<T> create()
focal_class.class_method_signature: RTree.add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_class.full_signature: public RTree<T> add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_class.return: RTree<T>
focal_class.signature: RTree<T> add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_class.class_method_signature: RTree.remove(T element)
focal_class.full_signature: public RTree<T> remove(T element)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (T element)
focal_class.return: RTree<T>
focal_class.signature: RTree<T> remove(T element)
focal_class.class_method_signature: RTree.getPickedObject(Point2D p)
focal_class.full_signature: public T getPickedObject(Point2D p)
focal_class.identifier: getPickedObject
focal_class.modifiers: public
focal_class.parameters: (Point2D p)
focal_class.return: T
focal_class.signature: T getPickedObject(Point2D p)
focal_class.class_method_signature: RTree.getGrid()
focal_class.full_signature: public Set<Shape> getGrid()
focal_class.identifier: getGrid
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Shape>
focal_class.signature: Set<Shape> getGrid()
focal_class.class_method_signature: RTree.getContainingLeafs(Point2D p)
focal_class.full_signature: public Collection<TreeNode> getContainingLeafs(Point2D p)
focal_class.identifier: getContainingLeafs
focal_class.modifiers: public
focal_class.parameters: (Point2D p)
focal_class.return: Collection<TreeNode>
focal_class.signature: Collection<TreeNode> getContainingLeafs(Point2D p)
focal_class.class_method_signature: RTree.count()
focal_class.full_signature: public int count()
focal_class.identifier: count
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int count()
focal_class.class_method_signature: RTree.asString()
focal_class.full_signature: private String asString()
focal_class.identifier: asString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String asString()
focal_class.class_method_signature: RTree.asString(Rectangle2D r)
focal_class.full_signature: private static String asString(Rectangle2D r)
focal_class.identifier: asString
focal_class.modifiers: private static
focal_class.parameters: (Rectangle2D r)
focal_class.return: String
focal_class.signature: String asString(Rectangle2D r)
focal_class.class_method_signature: RTree.asString(Collection<RTree<T>> trees)
focal_class.full_signature: private static String asString(Collection<RTree<T>> trees)
focal_class.identifier: asString
focal_class.modifiers: private static
focal_class.parameters: (Collection<RTree<T>> trees)
focal_class.return: String
focal_class.signature: String asString(Collection<RTree<T>> trees)
focal_class.class_method_signature: RTree.asString(Map<T, Rectangle2D> map)
focal_class.full_signature: private static String asString(Map<T, Rectangle2D> map)
focal_class.identifier: asString
focal_class.modifiers: private static
focal_class.parameters: (Map<T, Rectangle2D> map)
focal_class.return: String
focal_class.signature: String asString(Map<T, Rectangle2D> map)
focal_class.class_method_signature: RTree.asString(Map.Entry<T, Rectangle2D> entry)
focal_class.full_signature: private static String asString(Map.Entry<T, Rectangle2D> entry)
focal_class.identifier: asString
focal_class.modifiers: private static
focal_class.parameters: (Map.Entry<T, Rectangle2D> entry)
focal_class.return: String
focal_class.signature: String asString(Map.Entry<T, Rectangle2D> entry)
focal_class.class_method_signature: RTree.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public RTree<T> add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds) {
      // see if the root is not present (i.e. the RTree is empty
      if (!root.isPresent()) {
        // The first element addded to an empty RTree
        // Return a new RTree with the new LeafNode as its root
        return new RTree(LeafNode.create(element, bounds));
      }
      // otherwise...
      Node<T> node = root.get();
      if (node instanceof LeafNode) {
        // the root is a LeafNode
        LeafNode<T> leafNode = (LeafNode) node;
  
        Node<T> got = leafNode.add(splitterContext, element, bounds);
        Preconditions.checkArgument(
            !got.getParent().isPresent(), "return from LeafNode add has a parent");
        return new RTree(got);
  
      } else {
  
        InnerNode<T> innerNode = (InnerNode) node;
        Node<T> got = innerNode.add(splitterContext, element, bounds);
        Preconditions.checkArgument(
            !got.getParent().isPresent(), "return from InnerNode add has a parent");
        return new RTree(got);
      }
    }
focal_method.class_method_signature: RTree.add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_method.full_signature: public RTree<T> add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_method.identifier: add
focal_method.invocations: isPresent create get add checkArgument isPresent getParent add checkArgument isPresent getParent
focal_method.modifiers: public
focal_method.parameters: (SplitterContext<T> splitterContext, T element, Rectangle2D bounds)
focal_method.return: RTree<T>
focal_method.signature: RTree<T> add(SplitterContext<T> splitterContext, T element, Rectangle2D bounds)