@@ -281,29 +281,24 @@ public static void setStatus(String status) {
281281 /**
282282 * Defines the total progress of the current {@link Task}
283283 *
284- * @see Task#defineTotalProgress(long)
284+ * @param elements the number of discrete "elements" in the computation
285+ * @see Task#define(long)
285286 */
286- public static void defineTotalProgress (long numStages ) {
287- currentTask ().defineTotalProgress ( numStages );
287+ public static void defineTotal (long elements ) {
288+ currentTask ().define ( elements );
288289 }
289290
290291 /**
291292 * Defines the total progress of the current {@link Task}
292293 *
293- * @see Task#defineTotalProgress(long, long)
294+ * @param elements the number of discrete "elements" in the computation
295+ * @param subTasks the number <b>of times</b> subtasks are called upon
296+ * within the task. This <b>is not</b> the same as the number of
297+ * subtasks used (as one subtask may run multiple times).
298+ * @see Task#define(long, long)
294299 */
295- public static void defineTotalProgress (long numStages , long numSubTasks ) {
296- currentTask ().defineTotalProgress (numStages , numSubTasks );
297- }
298-
299- /**
300- * Defines the number of updates expected by the end of the current stage of
301- * the current {@link Task}
302- *
303- * @see Task#setStageMax(long)
304- */
305- public static void setStageMax (long max ) {
306- currentTask ().setStageMax (max );
300+ public static void defineTotal (long elements , long subTasks ) {
301+ currentTask ().define (elements , subTasks );
307302 }
308303
309304 /**
@@ -322,7 +317,7 @@ private NOPTask() {
322317
323318 @ Override
324319 public boolean isComplete () {
325- return true ;
320+ return false ;
326321 }
327322
328323 @ Override
@@ -340,6 +335,11 @@ public double progress() {
340335 return NOP_PROGRESS ;
341336 }
342337
338+ @ Override
339+ public void define (final long elements , final long subTasks ) {
340+ // NB: No-op
341+ }
342+
343343 }
344344
345345 private static final NOPTask IGNORED = new NOPTask ();
0 commit comments