+ /**
+ * Check if the action corresponding to this {@link Progress} is done (i.e.,
+ * if its progress value == its max value).
+ *
+ * @return TRUE if it is
+ */
+ public boolean isDone() {
+ return getProgress() == max;
+ }
+
+ /**
+ * Mark the {@link Progress} as done by setting its value to max.
+ */
+ public void done() {
+ synchronized (getLock()) {
+ double childrenProgress = relativeProgress - relativeLocalProgress;
+ relativeLocalProgress = 1 - childrenProgress;
+ setRelativeProgress(this, name, 1d);
+ }
+ }
+
+ /**
+ * Return the list of direct children of this {@link Progress}.
+ *
+ * @return the children (Who will think of the children??)
+ */
+ public Set<Progress> getChildren() {
+ return children.keySet();
+ }
+