I'm passing around a Uri.Builder object as a mechanism for subclasses to fill in whatever parameters necessary into a Uri before it is executed in Android.
Problem is, one of the parameters that the base class adds using builder.appendQueryParameter("q",searchPhrase);
needs to be replaced in the sub-class, but I can only find appendQueryParameter()
, there is no replace or set method. appendQueryParameter()
with the same parameter name adds another instance of the parameter, doesn't replace it.
Should I give up and try another way? Or is there a way to replace query parameters that I haven't found yet?