com.gos4j
Interface GoalType


public interface GoalType

GoalTypes are useful long lived templates for Goals, which should be used to create each short lived Goal.

You can set the duration of the type for all created goals using the setTargetDuration(...) method. Then having done this you can adapt the duration of the type by using previous Goals as examples, calling useExample(...).

Author:
Hugh@hughreid.com 27-May-2003

Method Summary
 com.gos4j.Goal createGoal()
          This creates a new goal instance of this type.
 boolean isStaged()
          This check to see if the staged interface is being used.
 void setStages(java.lang.Object[] stages)
          This predefines the stages of Goals that use the staged progress interface.
 void setTargetDuration(long duration)
          This updates the target duration for all subsequently created goals.
 void useExample(com.gos4j.Goal completedGoal)
          This is used to set the target duration to the appropriate value based on this and other example Goals.
 

Method Detail

createGoal

public com.gos4j.Goal createGoal()
This creates a new goal instance of this type.

Returns:
the new goal.

setTargetDuration

public void setTargetDuration(long duration)
This updates the target duration for all subsequently created goals.

Parameters:
duration - the length of time to acheive a goal of this type.

setStages

public void setStages(java.lang.Object[] stages)
This predefines the stages of Goals that use the staged progress interface.

Parameters:
stages - the objects representing the stages of progress in order.

isStaged

public boolean isStaged()
This check to see if the staged interface is being used.

Returns:
true if the stages have been set.

useExample

public void useExample(com.gos4j.Goal completedGoal)
This is used to set the target duration to the appropriate value based on this and other example Goals.

Parameters:
completedGoal - the goal to use as an example.