public String getQuery() {
        StringBuilder query = new StringBuilder();
        if (queryTail.length() > 0) {
            if (queryHead.length() == 0) {
                query.append("{?")
                        .append(queryTail)
                        .append("}");
            } else if (queryHead.length() > 0) {
                query.append(queryHead)
                        .append("{&")
                        .append(queryTail)
                        .append("}");
            }
        } else {
            query.append(queryHead);
        }
        return query.toString();
    }
public String getQuery ( ) { StringBuilder query = new StringBuilder ( ) ; if ( queryTail . length ( ) > 0 ) { if ( queryHead . length ( ) == 0 ) { query . append ( "{?" ) . append ( queryTail ) . append ( "}" ) ; } else if ( queryHead . length ( ) > 0 ) { query . append ( queryHead ) . append ( "{&" ) . append ( queryTail ) . append ( "}" ) ; } } else { query . append ( queryHead ) ; } return query . toString ( ) ; }
Query consisting of expanded parameters and unexpanded parameters.

@return query, may be empty