public class ListDemoModel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private DynamicLoader<IAccumulator> |
accLoader |
private IListAlgo |
foldl |
private IListAlgo |
foldr |
private IList |
list0 |
private IList |
list1 |
private IList |
list2 |
private IViewAdapter |
view |
private DynamicLoader<IListAlgo> |
visLoader |
Constructor and Description |
---|
ListDemoModel(IViewAdapter view)
Constructor for the class
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
runFoldL(IList list,
java.lang.String classname)
Run the FoldLAlgo visitor on the given list using the given IAccumulator
|
java.lang.String |
runFoldR(IList list,
java.lang.String classname)
Run the FoldRAlgo visitor on the given list using the given IAccumulator
|
java.lang.String |
runListAlgo(IList list,
java.lang.String classname,
java.lang.String param)
Returns the result of a host list executing the given visitor with the given parameter
|
void |
start()
Start the model
|
private IViewAdapter view
private IList list0
private IList list1
private IList list2
private DynamicLoader<IAccumulator> accLoader
private DynamicLoader<IListAlgo> visLoader
private IListAlgo foldr
private IListAlgo foldl
public ListDemoModel(IViewAdapter view)
view
- The view adapterpublic void start()
public java.lang.String runListAlgo(IList list, java.lang.String classname, java.lang.String param)
list
- The host list objectclassname
- The class name of the visitor to use, without the leading "listFW.visitor."param
- An input parameter for the visitor executionpublic java.lang.String runFoldR(IList list, java.lang.String classname)
list
- The host list objectclassname
- The class name of the accumulator to use, without the leading "listFW.visitor."public java.lang.String runFoldL(IList list, java.lang.String classname)
list
- The host list objectclassname
- The class name of the accumulator to use, without the leading "listFW.visitor."