budget/src/main/java/budget/backend/structures/AVLSearchTree.java
private AVLTreeNode<K, V> findKey(K key, AVLTreeNode<K, V> from) {
		if (from != null){
			if ((from.getLeft() == null) && (from.getRight() == null)) {
				return null;
			} else if (key.compareTo(from.getKey()) == 0) {
				return from;
			} else {
				if (key.compareTo(from.getKey()) < 0)
					return findKey(key, from.getLeft());
				else
					return findKey(key, from.getRight());
			}
		} return null;
	}
/**
	 * Find the given key in the tree using binary search
	 * 
	 * @param key  a Comparable instance
	 * @param from an AVLTreeNode, which is the root of the subtree in which the
	 *             search is executed
	 * @return the AVLTreeNode which has the given key
	 * @return null if the search was unsuccessfull
	 */
Find the given key in the tree using binary search

@param key  a Comparable instance
@param from an AVLTreeNode, which is the root of the subtree in which the
search is executed
@return the AVLTreeNode which has the given key
@return null if the search was unsuccessfull
Find the given key in the tree using binary search @param key a Comparable instance @param from an AVLTreeNode which is the root of the subtree in which the search is executed @return the AVLTreeNode which has the given key @return null if the search was unsuccessfull
private AVLTreeNode<K, V> findKey(K key, AVLTreeNode<K, V> from) {
		if (from != null){
			if ((from.getLeft() == null) && (from.getRight() == null)) {
				return null;
			} else if (key.compareTo(from.getKey()) == 0) {
				return from;
			} else {
				if (key.compareTo(from.getKey()) < 0)
					return findKey(key, from.getLeft());
				else
					return findKey(key, from.getRight());
			}
		} return null;
	}
private AVLTreeNode < K , V > findKey ( K key , AVLTreeNode < K , V > from ) { if ( from != null ) { if ( ( from . getLeft ( ) == null ) && ( from . getRight ( ) == null ) ) { return null ; } else if ( key . compareTo ( from . getKey ( ) ) == 0 ) { return from ; } else { if ( key . compareTo ( from . getKey ( ) ) < 0 ) return findKey ( key , from . getLeft ( ) ) ; else return findKey ( key , from . getRight ( ) ) ; } } return null ; }
Find the given key in the tree using binary search
Find the given key in the tree using binary search