com.atlassian.jira.imports.project.taskprogress
Class TaskProgressInterval

java.lang.Object
  extended by com.atlassian.jira.imports.project.taskprogress.TaskProgressInterval

public class TaskProgressInterval
extends java.lang.Object

Represents an interval of an overall Task Progress bar.

Since:
v3.13

Constructor Summary
TaskProgressInterval(TaskProgressSink taskProgressSink, int startPercent, int endPercent)
           
 
Method Summary
 int getEndPercent()
          Returns the overall percentage done at which this interval ends.
 int getStartPercent()
          Returns the overall percentage done at which this interval starts.
 TaskProgressInterval getSubInterval(int subIntervalStartPercent, int subIntervalEndPercent)
          Returns a subinterval of this interval.
 TaskProgressSink getTaskProgressSink()
          Returns the TaskProgressSink that this interval is to be used for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskProgressInterval

public TaskProgressInterval(TaskProgressSink taskProgressSink,
                            int startPercent,
                            int endPercent)
Method Detail

getSubInterval

public TaskProgressInterval getSubInterval(int subIntervalStartPercent,
                                           int subIntervalEndPercent)
Returns a subinterval of this interval. You pass in the start and end percent of the subinterval. A TaskProgressInterval is returned which contains the start and end of the overall progress for the subinterval.

eg If the parent interval runs from 20% - 60%, and we ask for a sub interval that runs from 25% - 50% of its parent, then the returned TaskProgressInterval would start at 30% and end at 40%.

Parameters:
subIntervalStartPercent - The start percent of the sub interval within the parent interval.
subIntervalEndPercent - The end percent of the sub interval within the parent interval.
Returns:
a subinterval of this interval.

getStartPercent

public int getStartPercent()
Returns the overall percentage done at which this interval starts.

Returns:
the overall percentage done at which this interval starts.

getEndPercent

public int getEndPercent()
Returns the overall percentage done at which this interval ends.

Returns:
the overall percentage done at which this interval ends.

getTaskProgressSink

public TaskProgressSink getTaskProgressSink()
Returns the TaskProgressSink that this interval is to be used for.

Returns:
the TaskProgressSink that this interval is to be used for.


Copyright © 2002-2010 Atlassian. All Rights Reserved.