gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gzz] Abstract Colorable Vob


From: Tuomas Lukka
Subject: Re: [gzz] Abstract Colorable Vob
Date: Fri, 14 Mar 2003 12:36:38 +0200
User-agent: Mutt/1.4i

On Fri, Mar 14, 2003 at 12:30:03PM +0200, Asko Soukka wrote:
> Fri, 14 Mar 2003, Tuomas Lukka wrote:
> > > But they could be shorthands to methods, which would
> > > have an override flag. When flag is set, old colors will
> > > be replaced when cloning, if unset, the new colors
> > > will be added next to old ones. ?
> > > 
> > >     ColorableVob cloneColored(Color[], boolean)
> > >     ColorableVob cloneColored(List, boolean);
> > >     ColorableVob cloneColored(Color, boolean);
> > 
> > This is not good: no-one will ever remember which one is which.
> 
> Well, I have to abstract those somehow to avoid duplicating code. 

See below.

> Did you 
> previously mean that we should have distinct functions for cloning with 
> only parameter colors and cloning with parameter colors added? 
> 
> Like the following;
> 
>   ColorableVob cloneColored(Color[]);
>   ColorableVob cloneColored(List);
>   ColorableVob cloneColored(Color);
> 
>   ColorableVob cloneColorAdded(Color[]);
>   ColorableVob cloneColorAdded(List);
>   ColorableVob cloneColorAdded(Color);

Yes.

> Both sets could be only shorthands to a third set, which has
> that override flag.

Uhh, why? Rather, cloneColorAdded(Color) would be implemented as

        return cloneColored(getColors().clone().append(color))

right?

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]