pingpong
Class PingPongWorker

java.lang.Object
  extended by pingpong.PingPongWorker
All Implemented Interfaces:
Worker, java.lang.Runnable

public class PingPongWorker
extends java.lang.Object
implements Worker


Constructor Summary
PingPongWorker()
           
 
Method Summary
 javax.swing.JComponent getGUI()
          Returns null, since this object does not provide a GUI component.
 float getPrecentageDone()
          Returns a float which represents what precentage of the calculation has completed.
 ResultUnit getResultUnit()
          Returns the ResultUnit produced by the implementing class.
 void run()
           
 void setWorkUnit(WorkUnit wu)
          Called by the host of the Worker object, in order to provide it with a work unit to be processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingPongWorker

public PingPongWorker()
Method Detail

setWorkUnit

public void setWorkUnit(WorkUnit wu)
Description copied from interface: Worker
Called by the host of the Worker object, in order to provide it with a work unit to be processed.

Specified by:
setWorkUnit in interface Worker
Parameters:
wu - the WorkUnit to process

getResultUnit

public ResultUnit getResultUnit()
Description copied from interface: Worker
Returns the ResultUnit produced by the implementing class.

Specified by:
getResultUnit in interface Worker
Returns:
the ResultUnit which is conveyed to the the Computation class

getGUI

public javax.swing.JComponent getGUI()
Returns null, since this object does not provide a GUI component.

Specified by:
getGUI in interface Worker
Returns:
null
See Also:
Worker.getGUI()

getPrecentageDone

public float getPrecentageDone()
Description copied from interface: Worker
Returns a float which represents what precentage of the calculation has completed. It is also feasiable that this value cannot be calculated, in which case a -1.0 should be returned.

Specified by:
getPrecentageDone in interface Worker
Returns:
-1.0
See Also:
Worker.getPrecentageDone()

run

public void run()
Specified by:
run in interface java.lang.Runnable