listFW
Class ToStringHelper
java.lang.Object
listFW.ToStringHelper
- All Implemented Interfaces:
- IListAlgo
class ToStringHelper
- extends Object
- implements IListAlgo
Helps ToStringAlgo compute the String representation of the rest of the list.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Singleton
public static final ToStringHelper Singleton
emptyCase
public Object emptyCase(IMTList host,
Object acc)
- Returns the accumulated String + ")".
At end of list: done!
- Specified by:
emptyCase
in interface IListAlgo
- Parameters:
host
- the IMTList
that is executing this algorithm.acc
- 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 acc)
- Continues accumulating the String representation by appending ", " + first to acc
and recur!
- Specified by:
nonEmptyCase
in interface IListAlgo
- Parameters:
host
- the INEList
that is executing this algorithmacc
- 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.