net.sf.mpxj
Class Relation

java.lang.Object
  extended by net.sf.mpxj.Relation

public final class Relation
extends Object

This class represents the relationship between two tasks. These relationships normally found in the lists of predecessors and successors associated with a task record in an MPX file.


Constructor Summary
Relation(Task sourceTask, Task targetTask, RelationType type, Duration lag)
          Default constructor.
 
Method Summary
 Duration getLag()
          This method retrieves the lag duration associated with this relationship.
 Task getSourceTask()
          Retrieve the source task of this relationship.
 Task getTargetTask()
          Retrieve the target task of this relationship.
 RelationType getType()
          Method used to retrieve the type of relationship being represented.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Relation

public Relation(Task sourceTask,
                Task targetTask,
                RelationType type,
                Duration lag)
Default constructor.

Parameters:
sourceTask - source task instance
targetTask - target task instance
type - relation type
lag - relation lag
Method Detail

getType

public RelationType getType()
Method used to retrieve the type of relationship being represented.

Returns:
relationship type

getLag

public Duration getLag()
This method retrieves the lag duration associated with this relationship.

Returns:
lag duration

getSourceTask

public Task getSourceTask()
Retrieve the source task of this relationship.

Returns:
source task

getTargetTask

public Task getTargetTask()
Retrieve the target task of this relationship.

Returns:
target task

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.