org.sandev.TaskHeap.structs
Class RelativeDeadlineStruct

java.lang.Object
  extended by org.sandev.TaskHeap.structs.RelativeDeadlineStruct
Direct Known Subclasses:
RelativeDeadline

public class RelativeDeadlineStruct
extends java.lang.Object

A relative deadline definition. Used for runtime calculations of due dates.

summary fields:
declared printname: Relative Deadline
help text: A relative deadline definition. Used for runtime calculations of due dates.

Field Summary
protected  int delta
          The time difference between when the reference is due and when this work item is due.
protected  int deltaTimeUnits
          The time units for the due date delta value.
protected  long reference
          The uniqueID of the component this relative deadline is being calculated from.
protected  int roundDay
          The day of the week the rounding should default to.
protected  int rounding
          The rounding to be applied when calculating a relative due date.
 
Constructor Summary
RelativeDeadlineStruct()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reference

protected long reference
The uniqueID of the component this relative deadline is being calculated from. A zero value indicates that the deadline is relative to the general due date set in the HeapAttributes.

help text: The uniqueID of the component this relative deadline is being calculated from. A zero value indicates that the deadline is relative to the general due date set in the HeapAttributes.

delta

protected int delta
The time difference between when the reference is due and when this work item is due.

help text: The time difference between when the reference is due and when this work item is due. So for example if this needs to be finished five days before the reference, then the delta would be -5. If it needs to be finished two days after the reference, the the delta would be 2. If this needs to be finished at the same time then the delta is 0.

deltaTimeUnits

protected int deltaTimeUnits
The time units for the due date delta value.

declared default value: DAYS

enumerated constant values:

  • HOURS("Hours") = 0
  • DAYS("Days") = 1
  • WEEKS("Weeks") = 2
declared invalid value: -1
declared printname: delta time units
help text: The time units for the due date delta value.

rounding

protected int rounding
The rounding to be applied when calculating a relative due date.

declared default value: NEAREST

enumerated constant values:

  • EXACT("Exact") = 0
  • NEAREST("Nearest") = 1
  • PRECEDING("Preceding") = 2
  • FOLLOWING("Following") = 3
  • MIDMONTH("Mid-Month") = 4
declared invalid value: -1
help text: The rounding to be applied when calculating a relative due date.

roundDay

protected int roundDay
The day of the week the rounding should default to. These values correspond to the constant values declared in java.util.Calendar, but structs aren't allowed to have external dependencies like that so the integer values are used for the declaration here.

declared default value: MONDAY

enumerated constant values:

  • MONDAY("Monday") = 2
  • TUESDAY("Tuesday") = 3
  • WEDNESDAY("Wednesday") = 4
  • THURSDAY("Thursday") = 5
  • FRIDAY("Friday") = 6
  • SATURDAY("Saturday") = 7
  • SUNDAY("Sunday") = 1
declared invalid value: -1
declared printname: round to day
help text: The day of the week the rounding should default to.
Constructor Detail

RelativeDeadlineStruct

public RelativeDeadlineStruct()