[Biojava-l] Proposal: ChangeType hierarchies (also event bridges)

Eric Blossom elb@BlossomAssociates.com
Thu, 22 Feb 2001 08:37:41 -0800 (PST)


Sedgewick uses self in his Algorithms books. How about coding up an
iterator so that users don't need getParent()? Could there be use
for other iteraters over the tree of types?

Eric

On Thu, 22 Feb 2001, Thomas Down wrote:

> On Thu, Feb 22, 2001 at 12:48:49PM +0000, Matthew Pocock wrote:
> > 
> > >   - Add extra constructors to ChangeType objects which allow
> > >     a parent to be specified.  If the current (no-parent)
> > >     constructors are used, we default to ChangeType.UNKNOWN
> > >     (which becomes the root of the type hierarchy).
> > > 
> > >     [Open issue: what is the value of ChangeType.UNKNOWN.getParent()?]
> > 
> > null, I think. Alternatively, it is its own parent (uck).
> 
> Yeah, I think null is a safer option than self.  Hopefully,
> anyone who's traversing up the ChangeType chain will stop
> when they hit ChangeType.UNKNOWN anyway.
> 
> ...
> 
>    Thomas.