|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapi.Task
tasks.Fib
public class Fib
Fibonacci task class.
Constructor Summary | |
---|---|
Fib(int n)
Fibonacci task of n |
|
Fib(TaskId taskId,
int n)
Constructor for Fib object without a successor task |
|
Fib(TaskId taskId,
TaskId successorId,
int successorInputIndex,
int n)
Constructor for Fib object with a successor task |
Method Summary | |
---|---|
Result |
execute()
Executes the Fib task |
boolean |
executeOnServer()
Method for checking whether this task should execute on the server |
int |
getN()
Gets the fibonacci input value |
java.lang.String |
toString()
Returns a string representation of this fibonacci |
Methods inherited from class api.Task |
---|
compareTo, getShared, getSuccessorId, getSuccessorInputIndex, getTaskId, sendEvent, setComputer, updateShared |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Fib(int n)
n
- the fibonacci number to computepublic Fib(TaskId taskId, int n)
taskId
- the id of the Fib taskn
- the fibonacci indexpublic Fib(TaskId taskId, TaskId successorId, int successorInputIndex, int n)
taskId
- the Fib task idsuccessorId
- the successor task idsuccessorInputIndex
- the successor task input indexn
- the fibonacci indexMethod Detail |
---|
public int getN()
public boolean executeOnServer()
executeOnServer
in class Task
public Result execute()
execute
in class Task
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |