private Item and(Item a, Item b) {
        if (a == null || a instanceof NullItem) {
            return b;
        }
        else if (b == null || b instanceof NullItem) {
            return a;
        }
        else if (a instanceof NotItem notItemA && b instanceof NotItem notItemB) {
            NotItem combined = new NotItem();
            combined.addPositiveItem(and(notItemA.getPositiveItem(), notItemB.getPositiveItem()));
            notItemA.negativeItems().forEach(item -> combined.addNegativeItem(item));
            notItemB.negativeItems().forEach(item -> combined.addNegativeItem(item));
            return combined;
        }
        else if (a instanceof NotItem notItem){
            notItem.addPositiveItem(b);
            return a;
        }
        else if (b instanceof NotItem notItem){
            notItem.addPositiveItem(a);
            return notItem;
        }
        else if (a instanceof AndItem) {
            ((AndItem)a).addItem(b);
            return a;
        }
        else {
            AndItem andItem = new AndItem();
            andItem.addItem(a);
            andItem.addItem(b);
            return andItem;
        }
    }
Modifies this query to become the current query AND the given item.

@return the resulting root item in this
container-search/src/main/java/com/yahoo/search/query/QueryTree.java