X-Git-Url: http://git.nikiroo.be/?p=jvcard.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2FBaseClass.java;h=42d4b0dd7f57090a056870f13280f573e6d2146c;hp=9533321b2f0b0673a5a00d236c3c8cff008a2540;hb=f04a32e97c847d7e2551037a4d5f6a070879215c;hpb=812124d18d08bfc270adab0cd1e289dc6126563b diff --git a/src/be/nikiroo/jvcard/BaseClass.java b/src/be/nikiroo/jvcard/BaseClass.java index 9533321..42d4b0d 100644 --- a/src/be/nikiroo/jvcard/BaseClass.java +++ b/src/be/nikiroo/jvcard/BaseClass.java @@ -307,7 +307,7 @@ public abstract class BaseClass> implements List { * * @param depth * the depth into which to descend (0 = only this object, not its - * children) + * children, negative value for infinite depth) * * @return the debug {@link String} */ @@ -333,7 +333,7 @@ public abstract class BaseClass> implements List { * *

* Not that this state is lossy. You cannot retrieve the data from - * the state, it can only be used as an ID to check if thw data are + * the state, it can only be used as an ID to check if the data are * identical. *

* @@ -346,7 +346,7 @@ public abstract class BaseClass> implements List { * Get the recursive state of the current object, i.e., its children * included. It represents the full state information about this object's * children. - * + *

* It is not hashed. * * @param builder @@ -372,7 +372,7 @@ public abstract class BaseClass> implements List { * * @param depth * the depth into which to descend (0 = only this object, not its - * children) + * children, negative value for infinite depth) * * @param tab * the current tabulation increment @@ -382,16 +382,16 @@ public abstract class BaseClass> implements List { builder.append(" "); builder.append(getContentState(false) + " " + getId()); - if (depth > 0) + if (depth != 0) builder.append(": ["); - if (depth > 0) { + if (depth != 0) { for (E child : this) { builder.append("\n"); child.getDebugInfo(builder, depth - 1, tab + 1); } } - if (depth > 0) { + if (depth != 0) { builder.append("\n"); for (int i = 0; i < tab; i++) builder.append(" "); @@ -400,7 +400,8 @@ public abstract class BaseClass> implements List { } /** - * Notify that this element has unsaved changes. + * Notify that this element and all its parent elements has unsaved + * changes. */ void setDirty() { dirty = true; @@ -421,7 +422,10 @@ public abstract class BaseClass> implements List { } /** - * Set the parent of this element and all its descendants. + * Set the parent of this element. + *

+ * Will also check and fix if needed the parent (this) of all its + * descendants (recursively). * * @param parent * the new parent