/** * Node interface that implements subclasses; * leaf and internal nodes. * @author nickgrifasi * @version 10/15/21 */ public interface BaseNode { /** * Inserts point into PRQuadTree. Recursively traverses * internal nodes. * @param x x coordinate of point * @param y y coordinate of point * @param width width of region * @param point depth of node in tree * @return root before leaflets */ public BaseNode insert(int x, int y, int width, Point point); /** * Merges tree. Occurs have a successful removal of point. * @param x x coordinate of point * @param y y coordinate of point * @param width width of merge * @return node that merged */ public BaseNode mergeTree(int x, int y, int width); /** * Removes a point from the PRQuadTree * @param x x coordinate of point * @param y y coordinate of point * @param width width * @param point to be removed from PRQuadTree * @param skip boolean flag that indicates if name * is to be used for the SkipList database. * @return node to be removed */ public Point remove(int x, int y, int width, Point point, boolean skip); /** * Method that outputs attributes of node, outputs next node * if it is internal. * @param x x coordinate of point * @param y y coordinate of point * @param width width of region * @param level level of node in tree * @return number of nodes traversed */ public int dump(int x, int y, int width, int level); /** * Finds duplicate points within tree */ public void findDuplicates(); /** * returns nonDupe points * @return int integer of nonduplicates */ public int getNonDupe(); /** * Returns point stored in node * @return LinkedList storing points */ public LinkedList getPoint(); }