adams.flow.generator
Class AbstractFlowGenerator<T extends AbstractActor>

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.generator.AbstractFlowGenerator<T>
Type Parameters:
T - the type of actor that owns this generator
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Generator<T>, Serializable
Direct Known Subclasses:
Template

public abstract class AbstractFlowGenerator<T extends AbstractActor>
extends AbstractOptionHandler
implements Generator<T>

Ancestor for generators that use model setups to generate flows.

Version:
$Revision: 5261 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  T m_Owner
          the owner.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractFlowGenerator()
           
 
Method Summary
protected  void check()
          Hook method for checks before generating the flow.
protected abstract  AbstractActor doGenerate()
          Generates the flow.
 AbstractActor generate()
          Generates the flow and returns it.
 T getOwner()
          Returns the owner.
 void setOwner(T value)
          Sets the owner.
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, defineOptions, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Owner

protected T extends AbstractActor m_Owner
the owner.

Constructor Detail

AbstractFlowGenerator

public AbstractFlowGenerator()
Method Detail

setOwner

public void setOwner(T value)
Sets the owner.

Specified by:
setOwner in interface Generator<T extends AbstractActor>
Parameters:
owner - the owner of this generator

getOwner

public T getOwner()
Returns the owner.

Specified by:
getOwner in interface Generator<T extends AbstractActor>
Returns:
the owner, null if none set

check

protected void check()
Hook method for checks before generating the flow.

Checks for owner.


doGenerate

protected abstract AbstractActor doGenerate()
Generates the flow.

Returns:
the flow

generate

public AbstractActor generate()
Generates the flow and returns it.

Specified by:
generate in interface Generator<T extends AbstractActor>
Returns:
the generated flow


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.