Interface listFW.IListFactory
- public interface IListFactory
- extends Object
Abstract factory to manufacture IEmptyList and INEList.
- Author:
- Dung X. Nguyen, Stephen B. Wong
- makeEmptyList
()
- Creates an empty list
- makeNEList
(Object, IList)
- Creates a non-empty list containing a given first and a given rest
makeEmptyList
public abstract IMTList makeEmptyList()
- Creates an empty list.
- Returns:
- an IMTList object.
makeNEList
public abstract INEList makeNEList(Object first, IList tail)
- Creates a non-empty list containing a given first and a given rest.
- Parameters:
- first - a data object.
- tail - != null, the rest of the non-empty list to be manufactured.
- Returns:
- an INEList object containing first and tail
- Throws: IllegalArgumentException
- if tail is null.