com.atlassian.bamboo.builder
Class BuildProgressBarImpl

java.lang.Object
  extended by com.atlassian.bamboo.builder.BuildProgressBarImpl
All Implemented Interfaces:
BuildProgressBar

public class BuildProgressBarImpl
extends java.lang.Object
implements BuildProgressBar


Constructor Summary
BuildProgressBarImpl(CurrentlyBuilding currentlyBuilding)
           
 
Method Summary
 long getAverageBuildDuration()
           
 double getPercentageCompleted()
          Elapsed time / total time
 java.lang.String getPercentageCompletedAsString()
           
 java.lang.String getPrettyTimeRemaining()
           
 java.lang.String getPrettyTimeRemaining(boolean isLong)
           
 int getTimeElpasedWidth()
          Return the width of the "elapsed time" progress bar
 int getTotalTimeWidth()
          Return the width of the "total time" progress bar
 boolean isUnderAverageTime()
          Returns true if elapse time < ave time
 boolean isValid()
          Returns true iff the ave time is > 0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildProgressBarImpl

public BuildProgressBarImpl(CurrentlyBuilding currentlyBuilding)
Method Detail

isValid

public boolean isValid()
Description copied from interface: BuildProgressBar
Returns true iff the ave time is > 0

Specified by:
isValid in interface BuildProgressBar
Returns:

isUnderAverageTime

public boolean isUnderAverageTime()
Description copied from interface: BuildProgressBar
Returns true if elapse time < ave time

Specified by:
isUnderAverageTime in interface BuildProgressBar
Returns:
true if elapse time < ave time

getPercentageCompleted

public double getPercentageCompleted()
Description copied from interface: BuildProgressBar
Elapsed time / total time

Specified by:
getPercentageCompleted in interface BuildProgressBar
Returns:
Elapsed time / total time

getPrettyTimeRemaining

public java.lang.String getPrettyTimeRemaining(boolean isLong)
Specified by:
getPrettyTimeRemaining in interface BuildProgressBar
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 java.lang.String getPrettyTimeRemaining()
Specified by:
getPrettyTimeRemaining in interface BuildProgressBar
Returns:
Returns the approximate amount of time remaining

getPercentageCompletedAsString

public java.lang.String getPercentageCompletedAsString()

getTotalTimeWidth

public int getTotalTimeWidth()
Description copied from interface: BuildProgressBar
Return the width of the "total time" progress bar

Specified by:
getTotalTimeWidth in interface BuildProgressBar
Returns:
width of bar

getTimeElpasedWidth

public int getTimeElpasedWidth()
Description copied from interface: BuildProgressBar
Return the width of the "elapsed time" progress bar

Specified by:
getTimeElpasedWidth in interface BuildProgressBar
Returns:

getAverageBuildDuration

public long getAverageBuildDuration()
Specified by:
getAverageBuildDuration in interface BuildProgressBar


Copyright © 2010 Atlassian. All Rights Reserved.