api
Class Successor

java.lang.Object
  extended by api.Task
      extended by api.Successor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Task>
Direct Known Subclasses:
MbrotComposer, Sum, TSPMin

public abstract class Successor
extends Task

Successor Task class

See Also:
Serialized Form

Constructor Summary
Successor(TaskId taskId, int inputCount)
          Constructor for Successor without a successor
Successor(TaskId taskId, TaskId successorId, int successorInputIndex, int inputCount)
          Constructor for Successor class
 
Method Summary
 java.lang.Object getInput(int index)
          Gets the input at the specified index
 int getInputSize()
          Gets the size of the input
 boolean hasAllInput()
          Method for determining if the successor has all of its input
 void setInput(int index, java.lang.Object value)
          Sets the input at the specified index
 
Methods inherited from class api.Task
compareTo, execute, executeOnServer, getShared, getSuccessorId, getSuccessorInputIndex, getTaskId, sendEvent, setComputer, updateShared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Successor

public Successor(TaskId taskId,
                 TaskId successorId,
                 int successorInputIndex,
                 int inputCount)
Constructor for Successor class

Parameters:
taskId - id for this task
successorId - id of the successor task. This can be null if there is no successor.
successorInputIndex - input index for the successor. this value is not used if the successor id is null.
inputCount - the number of inputs to this successor

Successor

public Successor(TaskId taskId,
                 int inputCount)
Constructor for Successor without a successor

Parameters:
taskId - id for this task
inputCount - the number of inputs to this successor
Method Detail

hasAllInput

public boolean hasAllInput()
Method for determining if the successor has all of its input

Returns:
true if this successor has all of its input, false otherwise

getInput

public java.lang.Object getInput(int index)
Gets the input at the specified index

Parameters:
index - the index of the input to get
Returns:
the input at the specified index

getInputSize

public int getInputSize()
Gets the size of the input

Returns:
the size of the input

setInput

public void setInput(int index,
                     java.lang.Object value)
Sets the input at the specified index

Parameters:
index - the index of the input to set
value - the input to set