listFW
Class ToStringAlgo
java.lang.Object
listFW.ToStringAlgo
- All Implemented Interfaces:
- IListAlgo
public class ToStringAlgo
- extends Object
- implements IListAlgo
Computes a String reprsentation of IList showing a left parenthesis followed
by elements of the IList separated by commas, ending with with a right parenthesis.
- Since:
- 02/27/2004
- Author:
- D.X. Nguyen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Singleton
public static final ToStringAlgo Singleton
emptyCase
public Object emptyCase(IMTList host,
Object inp)
- Returns "()".
- Specified by:
emptyCase
in interface IListAlgo
- Parameters:
host
- the IMTList
that is executing this algorithm.inp
- generic input parameter that can be used for any purpose.
- Returns:
- result from calling this method. The type of the result is
problem-specific and may be null.
nonEmptyCase
public Object nonEmptyCase(INEList host,
Object inp)
- Passes "(" + first to the rest of IList and asks for help to complete the computation.
- Specified by:
nonEmptyCase
in interface IListAlgo
- Parameters:
host
- the INEList
that is executing this algorithminp
- generic input parameter that can be used for any purpose.
- Returns:
- result from calling this method. The type of the result is
problem-specific and may be null.