From: Aaron H. <jgr...@li...> - 2006-08-23 19:16:10
Any objection to changing Subgraph#getBase from protected to public?
When passing subgraphs around, it gets quite tiresome to
simultaneously pass redundant references to the base graph. I can
make a public accessor in a subclass, which I've done, but I don't
see any general justification for prohibiting external access...
cheers
-Aaron
From: John V. S. <js...@gm...> - 2006-08-23 19:42:51
Aaron Harnly wrote:
> Any objection to changing Subgraph#getBase from protected to public?
> When passing subgraphs around, it gets quite tiresome to
> simultaneously pass redundant references to the base graph. I can
> make a public accessor in a subclass, which I've done, but I don't
> see any general justification for prohibiting external access...
Makes sense. We always start with the "need to know" principle; in this
case exposing it as public seems like the right thing to do. I'll
change it for 0.7.1.
I suppose the subclasses need covariant accessor methods; e.g.
UndirectedSubgraph should override getBase() to return an
UndirectedGraph. Luckily that's now possible in Java 1.5. (We'll see
what retroweaver makes of it.)
JVS