Package com.atlassian.bamboo.progressbar
Class ProgressBarImpl
- java.lang.Object
-
- com.atlassian.bamboo.progressbar.ProgressBarImpl
-
- All Implemented Interfaces:
ProgressBar
- Direct Known Subclasses:
BuildProgressBarImpl
public class ProgressBarImpl extends Object implements ProgressBar
-
-
Constructor Summary
Constructors Constructor Description ProgressBarImpl(ExecutionStatus executionStatus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetEstimatedDuration()Returns prospected duration of a task.doublegetPercentageCompleted()Elapsed time / total timeStringgetPercentageCompletedAsString()StringgetPrettyTimeRemaining()StringgetPrettyTimeRemaining(boolean isLong)intgetTimeElapsedWidth()Return the width of the "elapsed time" progress barintgetTotalTimeWidth()Return the width of the "total time" progress barbooleanisUnderAverageTime()Returns true if elapse time < ave timebooleanisValid()Returns true iff the ave time is > 0
-
-
-
Constructor Detail
-
ProgressBarImpl
public ProgressBarImpl(ExecutionStatus executionStatus)
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from interface:ProgressBarReturns true iff the ave time is > 0- Specified by:
isValidin interfaceProgressBar- Returns:
-
isUnderAverageTime
public boolean isUnderAverageTime()
Description copied from interface:ProgressBarReturns true if elapse time < ave time- Specified by:
isUnderAverageTimein interfaceProgressBar- Returns:
- true if elapse time < ave time
-
getPercentageCompleted
public double getPercentageCompleted()
Description copied from interface:ProgressBarElapsed time / total time- Specified by:
getPercentageCompletedin interfaceProgressBar- Returns:
- Elapsed time / total time
-
getPrettyTimeRemaining
public String getPrettyTimeRemaining(boolean isLong)
- Specified by:
getPrettyTimeRemainingin interfaceProgressBar- Parameters:
isLong- true if you want the long-winded version, false if you want the short version- Returns:
- Returns the approximate amount of time remaining
-
getPrettyTimeRemaining
public String getPrettyTimeRemaining()
- Specified by:
getPrettyTimeRemainingin interfaceProgressBar- Returns:
- Returns the approximate amount of time remaining
-
getPercentageCompletedAsString
public String getPercentageCompletedAsString()
- Specified by:
getPercentageCompletedAsStringin interfaceProgressBar
-
getTotalTimeWidth
public int getTotalTimeWidth()
Description copied from interface:ProgressBarReturn the width of the "total time" progress bar- Specified by:
getTotalTimeWidthin interfaceProgressBar- Returns:
- width of bar
-
getTimeElapsedWidth
public int getTimeElapsedWidth()
Description copied from interface:ProgressBarReturn the width of the "elapsed time" progress bar- Specified by:
getTimeElapsedWidthin interfaceProgressBar- Returns:
-
getEstimatedDuration
public long getEstimatedDuration()
Description copied from interface:ProgressBarReturns prospected duration of a task.- Specified by:
getEstimatedDurationin interfaceProgressBar- Returns:
- estimated execution total time in milliseconds
-
-