[Biojava-l] feature property changeability

Matthew Pocock matthew_pocock@yahoo.co.uk
Thu, 11 Apr 2002 11:34:14 +0100


Hi all,

I've checked in a change to the feature interface. It now has getters as 
well as setters for location, source and type. Additionaly, there are 
apropreate ChangeType constants on the Feature interface. I have tried 
to make sure that everything still compiles.

This change has implications for projection. For example, editing an 
exon on a clone will cause it to move on the chromosome into which the 
clone is assembled. This needs hammering thoroughly to make sure that 
everything works as expected.

There is a potential for instantiating lots of ChangeListener instances 
listening to immutable objects. Could I sudgest that we add some API to 
Changeable to allow introspection of which ChangeEvent instances can 
never be fired? Something like boolean isImmutable(ChangeType) would 
work fine, or perhaps the addListener method could return false if the 
listener is guaranteed to never get a call-back.

This API change will not be back-ported to the 1.2 branch. If enough 
people don't like it, we can remove it from the trunk. It's time to suck 
it and see.

All ideas welcomed.

Matthew