public List<String> queryParameterValues(String name) {
        if (queryNamesAndValues == null) return Collections.emptyList();
        List<String> result = new ArrayList<>();
        for (int i = 0, size = queryNamesAndValues.size(); i < size; i += 2) {
            if (name.equals(queryNamesAndValues.get(i))) {
                result.add(queryNamesAndValues.get(i + 1));
            }
        }
        return Collections.unmodifiableList(result);
    }
public List < String > queryParameterValues ( String name ) { if ( queryNamesAndValues == null ) return Collections . emptyList ( ) ; List < String > result = new ArrayList < > ( ) ; for ( int i = 0 , size = queryNamesAndValues . size ( ) ; i < size ; i += 2 ) { if ( name . equals ( queryNamesAndValues . get ( i ) ) ) { result . add ( queryNamesAndValues . get ( i + 1 ) ) ; } } return Collections . unmodifiableList ( result ) ; }
Returns all values for the query parameter {@code name} ordered by their appearance in this
URL. For example this returns {@code ["banana"]} for {@code queryParameterValue("b")} on {@code
http://host/?a=apple&b=banana}.

<p><table summary="">
<tr><th>URL</th><th>{@code queryParameterValues("a")}</th><th>{@code
queryParameterValues("b")}</th></tr>
<tr><td>{@code http://host/}</td><td>{@code []}</td><td>{@code []}</td></tr>
<tr><td>{@code http://host/?}</td><td>{@code []}</td><td>{@code []}</td></tr>
<tr><td>{@code http://host/?a=apple&k=key+lime}</td><td>{@code ["apple"]}</td><td>{@code
[]}</td></tr>
<tr><td>{@code http://host/?a=apple&a=apricot}</td><td>{@code ["apple",
"apricot"]}</td><td>{@code []}</td></tr>
<tr><td>{@code http://host/?a=apple&b}</td><td>{@code ["apple"]}</td><td>{@code
[null]}</td></tr>
</table>