public FlattenedItem next() {
        position++;

        if (position >= items.size()) {
            position = items.size();
            return null;
        }

        return items.get(position);
    }
Advances currentItem to the next term item and returns thatItem.
If the current item before this call is the last item, this will
return (and set currentItem to) null.
container-search/src/main/java/com/yahoo/prelude/semantics/engine/RuleEvaluation.java