package lrs; /** * Represents an abstract algorithm on a LRStruct. Acts as a visitor to a LRStruct host. * @author Dung X. Nguyen Copyright 2000 - All rights reserved. * @since 02/15/00 * @dependency lrs.LRStruct uses */ public interface IAlgo { /** * Operates on the LRStruct host when it is empty, given an input object. * @param host the LRStruct this IVisitor operates on. * @param input input object needed by this IVisitor. * @return an appropriate output object. */ public abstract Object nullCase(LRStruct host, Object input); /** * Operates on the LRStruct host when it is not empty, given an input object. * @param host the LRStruct this IVisitor operates on. * @param input input object needed by this IVisitor. * @return an appropriate output object. */ public abstract Object nonNullCase(LRStruct host, Object input); }