Module hw06

Interface IModelAdapter<THost>

Type Parameters:
THost - the type of the host to be used.

public interface IModelAdapter<THost>
Adapter to the model from the view
Author:
swong
  • Method Summary

    Modifier and Type
    Method
    Description
    runAlgo​(THost host, String classname, String param)
    Returns the result of the model processing given the visitor's classname and the given parameter string using the given host.
    runFoldL​(THost host, String accClassname, String param)
    Returns the result of the model processing given the accumulator's classname and the given parameter string using the given host with the FoldLAlgo visitor.
    runFoldR​(THost host, String accClassname, String param)
    Returns the result of the model processing given the accumulator's classname and the given parameter string using the given host with the FoldRAlgo visitor.
  • Method Details

    • runAlgo

      String runAlgo(THost host, String classname, String param)
      Returns the result of the model processing given the visitor's classname and the given parameter string using the given host.
      Parameters:
      host - The host that runs the given visitor
      classname - The visitor's class name to use
      param - The input parameter to use
      Returns:
      The result of the processing
    • runFoldR

      String runFoldR(THost host, String accClassname, String param)
      Returns the result of the model processing given the accumulator's classname and the given parameter string using the given host with the FoldRAlgo visitor.
      Parameters:
      host - The host that runs the FoldRAlgo visitor
      accClassname - The accumulator's class name to use
      param - (added for solution) parameter string
      Returns:
      The result of the processing
    • runFoldL

      String runFoldL(THost host, String accClassname, String param)
      Returns the result of the model processing given the accumulator's classname and the given parameter string using the given host with the FoldLAlgo visitor.
      Parameters:
      host - The host that runs the FoldLAlgo visitor
      accClassname - The accumulator's class name to use
      param - (Added for solution) parameter string
      Returns:
      The result of the processing