Interface listFW.IListFactory


public interface IListFactory
extends Object
Abstract factory to manufacture IEmptyList and INEList.

Author:
Dung X. Nguyen, Stephen B. Wong

Method Index

 o makeEmptyList ()
Creates an empty list
 o makeNEList (Object, IList)
Creates a non-empty list containing a given first and a given rest

Methods

 o makeEmptyList
public abstract IMTList makeEmptyList()
Creates an empty list.

Returns:
an IMTList object.
 o 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.