Actions should not be Identifiable ?

Cantor, Scott cantor.2 at osu.edu
Mon Mar 24 22:33:25 EDT 2014


On 3/24/14, 10:13 PM, "Tom Zeller" <tzeller at dragonacea.biz> wrote:
>
>The goal of what I have been unable to communicate would be a single
>AbstractComponent class, further consolidating
>AbstractInitializableComponent,
>AbstractIdentifiedInitializableComponent, and
>AbstractIdentifiableInitializableComponent.

I don't have strong feelings about the separation of Identified from
Identifiable. I think it could work fine to assume they go together and
handle the minor edge cases (of which I'm not actually aware...) where
setId() wouldn't work with an exception, personally.

But I think IDable and Initable are just separate ideas, personally, and
shouldn't be linked.

>I was referring to Daniel's comment regarding getId(), and was
>thinking of Object.toString(), i.e. :
>
> getClass().getName() + '@' + Integer.toHexString(hashCode())

I misunderstood, but as Rod said, I think that just invites bugs. I think
if you need to default the ID, it's not something that should have one,
personally.

-- Scott




More information about the dev mailing list