/** Adds a new phase. Caller needs to set progress weightage */ private synchronized Progress addNewPhase() { Progress phase = new Progress(); phases.add(phase); phase.setParent(this); return phase; }
/** Adds a node with a specified progress weightage to the tree. */ public synchronized Progress addPhase(float weightage) { Progress phase = new Progress(); progressWeightagesForPhases.add(weightage); phases.add(phase); phase.setParent(this); // Ensure that the sum of weightages does not cross 1.0 float sum = 0; for (int i = 0; i < phases.size(); i++) { sum += progressWeightagesForPhases.get(i); } if (sum > 1.0) { LOG.warn("Sum of weightages can not be more than 1.0; But sum = " + sum); } return phase; }
/** Adds a new phase. Caller needs to set progress weightage */ private synchronized Progress addNewPhase() { Progress phase = new Progress(); phases.add(phase); phase.setParent(this); return phase; }
/** Adds a new phase. Caller needs to set progress weightage */ private synchronized Progress addNewPhase() { Progress phase = new Progress(); phases.add(phase); phase.setParent(this); return phase; }
/** Adds a new phase. Caller needs to set progress weightage */ private synchronized Progress addNewPhase() { Progress phase = new Progress(); phases.add(phase); phase.setParent(this); return phase; }
/** Adds a new phase. Caller needs to set progress weightage */ private synchronized Progress addNewPhase() { Progress phase = new Progress(); phases.add(phase); phase.setParent(this); return phase; }
/** Adds a node with a specified progress weightage to the tree. */ public synchronized Progress addPhase(float weightage) { Progress phase = new Progress(); progressWeightagesForPhases.add(weightage); phases.add(phase); phase.setParent(this); // Ensure that the sum of weightages does not cross 1.0 float sum = 0; for (int i = 0; i < phases.size(); i++) { sum += progressWeightagesForPhases.get(i); } if (sum > 1.0) { LOG.warn("Sum of weightages can not be more than 1.0; But sum = " + sum); } return phase; }
/** Adds a node with a specified progress weightage to the tree. */ public synchronized Progress addPhase(float weightage) { Progress phase = new Progress(); progressWeightagesForPhases.add(weightage); phases.add(phase); phase.setParent(this); // Ensure that the sum of weightages does not cross 1.0 float sum = 0; for (int i = 0; i < phases.size(); i++) { sum += progressWeightagesForPhases.get(i); } if (sum > 1.0) { LOG.warn("Sum of weightages can not be more than 1.0; But sum = " + sum); } return phase; }
/** Adds a node with a specified progress weightage to the tree. */ public synchronized Progress addPhase(float weightage) { Progress phase = new Progress(); progressWeightagesForPhases.add(weightage); phases.add(phase); phase.setParent(this); // Ensure that the sum of weightages does not cross 1.0 float sum = 0; for (int i = 0; i < phases.size(); i++) { sum += progressWeightagesForPhases.get(i); } if (sum > 1.0) { LOG.warn("Sum of weightages can not be more than 1.0; But sum = " + sum); } return phase; }
/** Adds a node with a specified progress weightage to the tree. */ public synchronized Progress addPhase(float weightage) { Progress phase = new Progress(); progressWeightagesForPhases.add(weightage); phases.add(phase); phase.setParent(this); // Ensure that the sum of weightages does not cross 1.0 float sum = 0; for (int i = 0; i < phases.size(); i++) { sum += progressWeightagesForPhases.get(i); } if (sum > 1.0) { LOG.warn("Sum of weightages can not be more than 1.0; But sum = " + sum); } return phase; }