Open GoogleCodeExporter opened 8 years ago
Might be to do with warning suppression. Do the pre-compiled classes in the
library have warnings suppressed?
Original comment by antmatyj...@gmail.com
on 14 Mar 2011 at 6:36
OK, fixed with the new BSim3.0.jar.
Guess the warning suppression makes a big difference. Still, this needs some
thorough checking as BSim relies a lot on extending the base classes.
Original comment by antmatyj...@gmail.com
on 14 Mar 2011 at 6:40
Yeah this needs to be checked. It might be necessary to cast when using the
intersection method to elements of the correct form, but there should be no
problems with extended classes as the warning is related to objects that might
not include methods or members.
Original comment by tgorochowski@gmail.com
on 15 Mar 2011 at 9:58
[deleted comment]
[deleted comment]
Have started using Java generics now, for example
Vector<? extends BSimBacterium> someBacteria = ...
and this seems to be working deliciously so far (with no warnings or need for
suppression) so this could actually be a good solution. Bit iffy (read hackish)
with multiple bacteria species which is a shame, also might only be possible in
Java 7 (at least the things I'm trying to do).
I think I need to do some more reading on generics though, as they still look
like a good potential solution for a lot of things...
Original comment by antmatyj...@gmail.com
on 10 Jun 2011 at 2:31
No, this should be fine. In generics because you give the base type, it will be
able to check (against that class) that the necessary methods or members exist.
We shouldn't be calling anything other than standard bacterium methods on these
though.
Check what version of Java they are supported as we may need to update the
requirements page, but it is definitely a better solution!
Original comment by tgorochowski@gmail.com
on 11 Jun 2011 at 3:28
Original issue reported on code.google.com by
antmatyj...@gmail.com
on 14 Mar 2011 at 6:33