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:
nonEmptyCasein interfaceIListAlgo- Parameters:
nu- Not usedhost- theNEListthat is executing this algorithm- Returns:
- result from calling this method. The type of the result is problem-specific and may be null.
-