package schemeFW;
/**
* Visitor representing an abstract algorithm to be executed by a host
* IList
.
* Breaks up an algorithm into two separate cases:
*
* emptyCase() - to be called by an* @author Dung X. Nguyen * @author Stephen B. Wong * @Custom Copyright 2001 -All rights reserved * @dependency schemeFW.IEmptyList uses * @dependency schemeFW.INEList uses */ public interface IListAlgo { /** * The method called byIEmptyList
host; * nonEmptyCase() - to be called by anINEList
host. *
IEmptyList
, the empty list.
* @param host The IEmptyList
that is executing this algorithm.
* @param inp generic input parameter that can be used for any purpose.
* @return Object
result from calling this method.
*/
public abstract Object emptyCase(IEmptyList host, Object inp);
/**
* The method called by a INEList
, a non-empty list.
* @param host The INEList that is executing this algorithm
* @param inp generic input parameter that can be used for any purpose.
* @return Object
result from calling this method.
*/
public abstract Object nonEmptyCase(INEList host, Object inp);
}