java.lang.Object
provided.listFW.MTList
- All Implemented Interfaces:
IList
Represents the unique empty list using the singleton pattern.
Provides concrete code for the execute method: simply calls the emptyCase
method of the IListAlgo parameter, passing to this method itself as the host
and the given input Object as the input.
- Author:
- D. X. Nguyen, S. B. Wong
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
Singleton
Singleton Pattern
-
-
Constructor Details
-
MTList
private MTList()Private constructor for the Singleton
-
-
Method Details
-
execute
Calls the empty case of the algorithm algo, passing to it itself as the host parameter and the given input inp as the input parameter. This method is marked as final to prevent all subclasses from overriding it. Finalizing a method also allows the compiler to generate more efficient calling code. -
toString
-