click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Finn Bock <bck...@gmail.com>
Subject Re: [jira] Commented: (CLK-696) Use typesafe collection
Date Thu, 24 Jun 2010 07:41:23 GMT
2010/6/24 Adrian A:
> What if we make OptionGroup extend Option?
> Wouldn't that simplify the problem?

Indeed it would, but with a tiny risk of breaking existing user code like:

  Object opt = ...;
  if (opt instanceof Option) {
      doSomethingOption((Option) opt);
  } else if (opt instanceof OptionGroup) {
      doSomethingOptionGroup((OptionGroup) opt);
  }

regards,
Finn

Mime
View raw message