The most logical difference would be that a Set tells you that the elements
stored in it will be unique while a Collection might permit you to introduce
duplicates.

-Tako

On 10/27/06, Marcel Reutegger <[EMAIL PROTECTED]> wrote:

Julian Reschke wrote:
> Marcel Reutegger schrieb:
>> I think both approaches have their disadvantages. Using a map requires
>> casting to Strings (we currently have to stick with 1.4, I think) and
>> Properties class exposes methods like store and load which are useless
>> (or even dangerous).
>
> Well, SPI already uses generic Collections in one other place, so I
> really don't buy that one :-)

we tried to avoid casting where it was possible with reasonable effort.
e.g.
introducing a separate interface for a type safe QName collection seems
overkill.

> Speaking of which, is there a particular reason why
> QNodeTypeDefinition.getDependencies returns a Collection, not a Set?

because we didn't see a need for a Set. a collection is IMO sufficient.
what is
the benefit of a Set over a Collection for a client?

regards
  marcel

Reply via email to