net.usa.rharder.tabusearch22
Class TSTabuEvent

java.lang.Object
  |
  +--net.usa.rharder.tabusearch22.TSTabuEvent

public class TSTabuEvent
extends java.lang.Object

These events are fired off by the TSEngine and are useful for extending the engine to include such things as long term memory and other tabu extras. These are lightweight events that only contain a reference to their source object.

Since:
1.1
See Also:
TSEngine, TSEngineFinishedListener, TSEngineStartedListener, TSNewBestSolutionListener, TSNewCurrentSolutionListener, TSUnimprovingMoveListener

Constructor Summary
TSTabuEvent(java.lang.Object source)
          Constructor that accepts the source of the event.
 
Method Summary
 java.lang.Object getSource()
          Returns the source of the event.
 TSEngine getTSEngine()
          Casts the source as a TSEngine prior to returning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSTabuEvent

public TSTabuEvent(java.lang.Object source)
Constructor that accepts the source of the event.
Parameters:
source - The source of the event.
Method Detail

getSource

public final java.lang.Object getSource()
Returns the source of the event. Although it returns an Object, it will always refer to the TSEngine that produced the event.
Returns:
The engine that produced the event.

getTSEngine

public final TSEngine getTSEngine()
Casts the source as a TSEngine prior to returning. It is equivalent to (TSEngine) getSource().
Returns:
source as TSEngine