budget/src/main/java/budget/backend/structures/AVLSearchTree.java
private AVLTreeNode<K, V> case2(AVLTreeNode<K, V> n){
    //start from the parent. the child is right, and the grandchild is right
		//this method rewrites two and a half handshakes.			
		n = n.getRight();
		AVLTreeNode<K,V> subT = n.getLeft();
		n.setLeft(n.getParent());
		n.setParent((n.getLeft()).getParent());//this handshake is not resolved here
		(n.getLeft()).setParent(n);

		(n.getLeft()).setRight(subT);
		subT.setParent(n.getLeft());
		//retrun the child. Do not worry about the handshake here
		return n;
  }
/**
   * inbalance is caused by two consecutive right children (right child, right grandchild)
   * @param n the grandchild
   */
inbalance is caused by two consecutive right children (right child, right grandchild)
@param n the grandchild
inbalance is caused by two consecutive right children ( right child right grandchild ) @param n the grandchild
private AVLTreeNode<K, V> case2(AVLTreeNode<K, V> n){
		n = n.getRight();
		AVLTreeNode<K,V> subT = n.getLeft();
		n.setLeft(n.getParent());
		n.setParent((n.getLeft()).getParent());
		(n.getLeft()).setParent(n);
		(n.getLeft()).setRight(subT);
		subT.setParent(n.getLeft());
		return n;
  }
private AVLTreeNode < K , V > case2 ( AVLTreeNode < K , V > n ) { n = n . getRight ( ) ; AVLTreeNode < K , V > subT = n . getLeft ( ) ; n . setLeft ( n . getParent ( ) ) ; n . setParent ( ( n . getLeft ( ) ) . getParent ( ) ) ; ( n . getLeft ( ) ) . setParent ( n ) ; ( n . getLeft ( ) ) . setRight ( subT ) ; subT . setParent ( n . getLeft ( ) ) ; return n ; }
inbalance is caused by two consecutive right children (right child, right grandchild)
 @param n the grandchild
inbalance is caused by two consecutive right children ( right child right grandchild ) @param n the grandchild
//start from the parent. the child is right, and the grandchild is right //this method rewrites two and a half handshakes.			 //this handshake is not resolved here //retrun the child. Do not worry about the handshake here