listFW.visitor
Class SumIntList
java.lang.Object
listFW.visitor.SumIntList
- All Implemented Interfaces:
- IListAlgo<Integer,Integer,Object>
public class SumIntList
- extends Object
- implements IListAlgo<Integer,Integer,Object>
Sums a IList using a reverse accumulation (natural recursion) algorithm.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SumIntList
public SumIntList()
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>