Thu, 4 Apr 2002 11:52:53 +0100
I would be happy if equals and hashCode on feature worked by being
equivalent to delegating to the return value of makeTemplate - this includes
all info except the children and parent. Since features can access both
children and parents, you would potentialy get into a circular stack if you
took hashcodes or equals of all fields.
Are there cases where two "equivalent" feature instances wouldn't produce
the same templates? Are there any cases where two "non-equivalent" features
would produce the same template (baring parent/child issues)?
----- Original Message -----
From: "David Huen" <email@example.com>
Sent: Wednesday, April 03, 2002 10:17 PM
Subject: [Biojava-l] FeatureHolder.containsFeature()
> I'm going thru' the process of doing a Gadfly-to-BioJava bridge.
> What are the semantics of containsFeature() should have? In
> SimpleFeatureHolder.java, it goes for the objects being identical which
> makes sense for an in-memory implementation but much more problematic
> with a database-backed object.
> If containsFeature() should work on "equality" of object, when should
> objects be equal? When all fields are identical? Or when Location type
> (and strand if relevant) match? How do we deal with the annotation
> bundle? If it is required for equality how do we deem equality?
> Or do we attempt to circumvent all this by requiring that the feature has
> the same row id in its respective table as the feature being compared?
> David Huen
> Biojava-l mailing list - Biojavafirstname.lastname@example.org