public void addTree ( @ Nonnull final ExpressionTree tree ) { assertNotNull ( "Tree is null" , tree ) ; if ( last . isEmptySlot ( ) ) { final ExpressionTreeElement thatTreeRoot = tree . getRoot ( ) ; if ( ! thatTreeRoot . isEmptySlot ( ) ) { last = thatTreeRoot ; last . makeMaxPriority ( ) ; } } else { last = last . addSubTree ( tree ) ; } }
Add whole tree as a tree element also it sets the maximum priority to the new element