java.lang.Object
provided.listFW.visitors.CountAlgo
- All Implemented Interfaces:
IListAlgo
Returns the count of the number of elements in the list
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CountAlgo
public CountAlgo()
-
-
Method Details
-
emptyCase
Returns zero always -
nonEmptyCase
Returns 1 plus the count of the rest of the list.- Specified by:
nonEmptyCase
in interfaceIListAlgo
- Parameters:
nu
- Not usedhost
- theNEList
that is executing this algorithm- Returns:
- result from calling this method. The type of the result is problem-specific and may be null.
-