001 package lrs; 002 003 /** 004 * Represents an abstract algorithm on an LRStruct. Acts as a visitor to a 005 * LRStruct host. 006 * @author Dung X. Nguyen and Stephen Wong Copyright 2005 - All rights reserved. 007 * @since 8/25/05 008 */ 009 public interface IAlgo { 010 /** 011 * Operates on an empty LRStruct host, given an input object. 012 * @param host an empty LRStruct. 013 * @param inp variable input list of objects needed by this IVisitor. 014 * @return an appropriate output object. 015 */ 016 public abstract Object emptyCase(LRStruct host, Object... inp); 017 018 /** 019 * Operates on a non-empty LRStruct host, given an input object. 020 * @param host a non-empty LRStruct. 021 * @param inp variable input list of objects needed by this IVisitor. 022 * @return an appropriate output object. 023 */ 024 public abstract Object nonEmptyCase(LRStruct host, Object... inp); 025 } 026