[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
design-questions
hi,
i implemented now the "UnitMap" as abstract class, but i ran into the
following "problem": the constructors of a class are not inherited by a
subclasses. but i made 9 constructors, and it is in a certain sense
redundant do always write "classname(....) { super(.....); }".
is there a way of avoiding that?
another question:
i have a computation, that takes several analysis, and creates another
result. But the analyses are given as parameter, and when i ask for
flowSets i can't be sure, that they are all of the same type. Even worse:
when i want to create a new flowset, i don't know, what flowset to create.
I can use "clone()" to get a compatible flowset, but sometimes i don't want
to clone, but just get an empty flowset (and calling "clear" after the
"clone()" is not very clever).
There are now two solutions: Either a FlowSet must have method
"getEmptySet", that returns an empty set, or a FlowSet must be able to work
with flowset of other types too. A combination of both is of course
possible too.
could you please give me your opinion on them, so i could make the right
choice, *if* i implement them?
finally: i added the Value-interface to the EquivalentValue-class, so an
EquivalentValue can now be used instead of a Value. Was this a bad idea?
mfg
florian loitsch
--
People who think they know everything are very irritating to those of us who do.
- Anon.