Re: [configuration] Change Commons-Configuration getVector to getSet?Out of
curiosity, what would be a usecase for multiple duplicate config entries
that are the same?  Maybe to count them or something?  So, does anyone have
an opinion on List?  I definitly can understand why the Set wouldn't work.
I suggested Set thinking order didn't matter, but you are right, it does..

I guess I just don't like the look of Vector in things...

Eric
  -----Original Message-----
  From: Emmanuel Bourg [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 17, 2003 2:45 PM
  To: Jakarta Commons Developers List
  Cc: 'Turbine Developers List'
  Subject: Re: [configuration] Change Commons-Configuration getVector to
getSet?


  A Set is too restrictive i think, there are valid reasons for preserving
  duplicate configuration entries. I would use a Collection or better, a
  List when the element order matters.

  Emmanuel



  Eric Pugh wrote:

  > Hi all,
  >
  > I am looking at a chunk of code like this:
  >  Vector packages = Turbine.getConfiguration()
  >                     .getVector(TurbineConstants.MODULE_PACKAGES);
  >
  >                 ObjectUtils.addOnce(packages,
  >                         GenericLoader.getBasePackage());
  >
  > from Layout Loader...
  >
  > And it seems to me that commons-configuration getVector should be
deprecated
  > in favor of getSet().  I can't think why you would want duplicate
values, so
  > getSet() makes more sense then getList().
  >
  > Then, funky call's like the ObjectUtils.addOnce() wouldn't be needed...
  >
  > Opinons?  And do we have to deprecate getVector() since we haven't
released
  > from sandbox yet?
  >
  > Eric Pugh
  >
  >
  > ---------------------------------------------------------------------
  > To unsubscribe, e-mail: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]
  >
  >
  >

Reply via email to