Hi,
On Thu, Feb 20, 2014 at 9:15 AM, <[email protected]> wrote:
> + @Override
> + public String toString() {
> + return getPath() + ": " + toString(getNodeState());
> + }
> +
> + protected String toString(NodeState nodeState) {
Given that the intention is to avoid exposing in toString() details
that are not accessible through other methods, it would seem cleaner
to implement it in terms of the publicly accessible methods:
for (PropertyState p : getProperties()) {
sb.append(' ').append(p).append(',');
}
for (String name : getChildNames()) {
sb.append(' ').append(name).append( " = { ... },");
}
Otherwise it'll pretty easy to forget to update the toString() method
in case we make some changes in the way hidden content is handled.
BR,
Jukka Zitting