Package com.atlassian.bamboo.progressbar
Class ProgressBarImpl
java.lang.Object
com.atlassian.bamboo.progressbar.ProgressBarImpl
- All Implemented Interfaces:
ProgressBar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns prospected duration of a task.doubleElapsed time / total timegetPrettyTimeRemaining(boolean isLong) intReturn the width of the "elapsed time" progress barintReturn the width of the "total time" progress barbooleanReturns true if elapse time < ave timebooleanisValid()Returns true iff the ave time is > 0
-
Constructor Details
-
ProgressBarImpl
-
-
Method Details
-
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
- 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
- Specified by:
getPrettyTimeRemainingin interfaceProgressBar- Returns:
- Returns the approximate amount of time remaining
-
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
-