Module hw06

Interface IList

All Known Implementing Classes:
MTList, NEList

public interface IList
Represents the abstract list structure with a hook method to call on the extrinsic behaviors represented as visitors.
Author:
D. X. Nguyen, S. B. Wong
  • Method Summary

    Modifier and Type
    Method
    Description
    execute​(IListAlgo algo, Object... inp)
    Relegates to subclasses to call algo to perform the appropriate task with the given input and returns an Object representing the output of the computation.
  • Method Details

    • execute

      Object execute​(IListAlgo algo, Object... inp)
      Relegates to subclasses to call algo to perform the appropriate task with the given input and returns an Object representing the output of the computation.
      Parameters:
      algo - an extrinsic operation (algorithm) on this IList.
      inp - a variable number of input parameters needed by algo to perform the computation.
      Returns:
      an Object representing the output of the computation.