Hi Marc,
>>> Maps are OK but what you really need is MultivaluedMap. However, I
>>> don't want to make that a concrete API class.
>> For this I proposed to use the parameter Map<String, Object>. If an
>> value is a Collection (e.g. a List; that's the MultivaluedMap), than
>> iterate over the values and not directly call toString() on the
>> collection. And for analogy, I proposed this for the other methods.
>> And if someone wants to put e.g. the String "[..., ...]" of an
>> ArrayList into the paramsters (very rare usecase), he could use
>> list.toString().
> I wondered if that is what you intended. I'm not really keen on
> methods that do one thing with one type of parameter and another with
> a different type. Its complex to explain and document, liable to
> confuse people and makes the API look and feel overly complex.
I agree, that it is not a good style. But it allows the use of a
MultivaluedMap, and it is very easy to use, if someone wants some
parameters only one times, and other multiple values for some parameter
keys.
best regards
Stephan