Attribute#getvalues()
Cantor, Scott
cantor.2 at osu.edu
Thu Mar 28 10:32:19 EDT 2013
On 3/28/13 5:56 AM, "Rod Widdowson" <rdw at steadingsoftware.com> wrote:
>The javadoc for Attribute#getvalues() states:
>
> * Gets the unordered, unmodifiable collection of values of the
>attribute.
>
>This way of thinking is reflected in the code which has a setValues() (as
>opposed to V2 in which a common paradigm is
>attribute.getValues().add("thing");
That seems at odds with the XMLObject collection behavior, which AFAIK
hasn't changed for V3.
>I think that it's reasonable to assume that the code represents more
>recent
>thought than the javadoc (it¹s the nature of the beast). Nonetheless I
>prefer the paradigm of returning unmodifiable set since it makes
>rationalizing about thread safety easier, plus I hate the idea of reaching
>into an object and dinking with its contents even when it is guarded set,
>but other may differ.
The other concern is that aren't a lot of V2 scripts using the
getValues().add() approach?
-- Scott
More information about the dev
mailing list