Leo Sutic wrote:

Berin,

for QueueElement, is it always true that:

a.getType() == b.getType() <-------> a.getClass() == b.getClass()

that is, one can always discriminate depending on event class?


It SHOULD be.  Although, when you are validating long against
long that is written by a developer, you can never enforce this.
We could write the requirement that this happens, i.e.:

The Type returned MUST be unique to a given class so that

a.getType() == b.getType();

if

a.getClass().equals(b.getClass());

However, if the Classes for "a" and "b" are different classes
(even if one is a subclass of the other), then a.getType != b.getType();





--

"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to