private String listString(Iterator<?> iterator) {
        StringBuilder result = new StringBuilder();
        result.append('(');

        boolean firstTime = true;
        while (iterator.hasNext()) {
            if (!firstTime)
                result.append(' ');
            firstTime = false;

            result.append(valueString(iterator.next()));
        }

        result.append(')');
        return result.toString();
    }
Creates a detailed representation of a query tree.

@author Tony Vaagenes
container-search/src/main/java/com/yahoo/prelude/query/textualrepresentation/TextualQueryRepresentation.java