Package com.atlassian.bamboo.progressbar
Class ProgressBarImpl
java.lang.Object
com.atlassian.bamboo.progressbar.ProgressBarImpl
- All Implemented Interfaces:
ProgressBar
- Direct Known Subclasses:
BuildProgressBarImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns prospected duration of a task.double
Elapsed time / total timegetPrettyTimeRemaining
(boolean isLong) int
Return the width of the "elapsed time" progress barint
Return the width of the "total time" progress barboolean
Returns true if elapse time < ave timeboolean
isValid()
Returns true iff the ave time is > 0
-
Constructor Details
-
ProgressBarImpl
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:ProgressBar
Returns true iff the ave time is > 0- Specified by:
isValid
in interfaceProgressBar
- Returns:
-
isUnderAverageTime
public boolean isUnderAverageTime()Description copied from interface:ProgressBar
Returns true if elapse time < ave time- Specified by:
isUnderAverageTime
in interfaceProgressBar
- Returns:
- true if elapse time < ave time
-
getPercentageCompleted
public double getPercentageCompleted()Description copied from interface:ProgressBar
Elapsed time / total time- Specified by:
getPercentageCompleted
in interfaceProgressBar
- Returns:
- Elapsed time / total time
-
getPrettyTimeRemaining
- Specified by:
getPrettyTimeRemaining
in 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:
getPrettyTimeRemaining
in interfaceProgressBar
- Returns:
- Returns the approximate amount of time remaining
-
getPercentageCompletedAsString
- Specified by:
getPercentageCompletedAsString
in interfaceProgressBar
-
getTotalTimeWidth
public int getTotalTimeWidth()Description copied from interface:ProgressBar
Return the width of the "total time" progress bar- Specified by:
getTotalTimeWidth
in interfaceProgressBar
- Returns:
- width of bar
-
getTimeElapsedWidth
public int getTimeElapsedWidth()Description copied from interface:ProgressBar
Return the width of the "elapsed time" progress bar- Specified by:
getTimeElapsedWidth
in interfaceProgressBar
- Returns:
-
getEstimatedDuration
public long getEstimatedDuration()Description copied from interface:ProgressBar
Returns prospected duration of a task.- Specified by:
getEstimatedDuration
in interfaceProgressBar
- Returns:
- estimated execution total time in milliseconds
-