listFW.visitor
Class SumIntList_Fwd

java.lang.Object
  extended by listFW.visitor.SumIntList_Fwd
All Implemented Interfaces:
IListAlgo<Integer,Integer,Object>

public class SumIntList_Fwd
extends Object
implements IListAlgo<Integer,Integer,Object>

Sums a IList using a forward accumulation algorithm. Demonstrates that passing a non-parameterized value through a varargs is no problem.


Field Summary
private  IListAlgo<Integer,Integer,Integer> helper
           
 
Constructor Summary
SumIntList_Fwd()
           
 
Method Summary
 Integer emptyCase(IMTList<? extends Integer> host, Object... inp)
           
 Integer nonEmptyCase(INEList<? extends Integer> host, Object... inp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helper

private IListAlgo<Integer,Integer,Integer> helper
Constructor Detail

SumIntList_Fwd

public SumIntList_Fwd()
Method Detail

emptyCase

public Integer emptyCase(IMTList<? extends Integer> host,
                         Object... inp)
Specified by:
emptyCase in interface IListAlgo<Integer,Integer,Object>

nonEmptyCase

public Integer nonEmptyCase(INEList<? extends Integer> host,
                            Object... inp)
Specified by:
nonEmptyCase in interface IListAlgo<Integer,Integer,Object>