Class listFW.MTList
- public class MTList
- extends Object
- implements listFW.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

Singleton
- Singleton Pattern

MTList
()

execute
(IListAlgo, Object)
- Calls the empty case of the algorithm algo, passing to it itself as

Singleton
public static final MTList Singleton = new MTList()
- Singleton Pattern

MTList
private MTList()

execute
public final Object execute(IListAlgo algo, Object inp)
- 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.