jbil.common
Class AbstractAlgorithm

java.lang.Object
  extended by jbil.common.AbstractAlgorithm
All Implemented Interfaces:
Algorithm
Direct Known Subclasses:
GibbsMotifSiteSampler

public abstract class AbstractAlgorithm
extends java.lang.Object
implements Algorithm

Stub implementation of the Algorithm interface.

Author:
Paulo G. S. da Fonseca

Constructor Summary
AbstractAlgorithm()
           
 
Method Summary
 java.lang.Object getInput(java.lang.String name)
          Get the input value associated to a name.
 java.lang.Object getOutput(java.lang.String name)
          Gets an output of the algorithm from its name.
abstract  void run()
          Executes the algorithm once.
 void setInput(java.lang.String name, java.lang.Object value)
          Sets an input to the algorithm.
 void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)
          Sets multiple inputs to the algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAlgorithm

public AbstractAlgorithm()
Method Detail

getInput

public java.lang.Object getInput(java.lang.String name)
Description copied from interface: Algorithm
Get the input value associated to a name.

Specified by:
getInput in interface Algorithm
Parameters:
name - The name of the input

setInput

public void setInput(java.lang.String name,
                     java.lang.Object value)
Description copied from interface: Algorithm
Sets an input to the algorithm.

Specified by:
setInput in interface Algorithm
Parameters:
name - The name of the input.
value - The value of the input.

setInputs

public void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)
Description copied from interface: Algorithm
Sets multiple inputs to the algorithm.

Specified by:
setInputs in interface Algorithm
Parameters:
inputs - A map associating the names of the inputs to their values.

getOutput

public java.lang.Object getOutput(java.lang.String name)
Description copied from interface: Algorithm
Gets an output of the algorithm from its name.

Specified by:
getOutput in interface Algorithm
Parameters:
name - The name of the output.

run

public abstract void run()
Description copied from interface: Algorithm
Executes the algorithm once.

Specified by:
run in interface Algorithm