001 package lrs;
002
003 /**
004 * Represents an abstract algorithm on an LRStruct. Acts as a visitor to a
005 * <p/>
006 * LRStruct host.
007 *
008 * @author Dung X. Nguyen Copyright 2001 - All rights reserved.
009 * @since 10/09/01
010 */
011
012 public interface IAlgo {
013 /**
014 * Operates on an empty LRStruct host, given an input object.
015 *
016 * @param host an empty LRStruct.
017 * @param inp input object needed by this IAlgo.
018 *
019 * @return an appropriate output object.
020 */
021 public abstract Object emptyCase(LRStruct host, Object inp);
022
023 /**
024 * Operates on a non-empty LRStruct host, given an input object.
025 *
026 * @param host a non-empty LRStruct.
027 * @param inp input object needed by this IAlgo.
028 *
029 * @return an appropriate output object.
030 */
031 public abstract Object nonEmptyCase(LRStruct host, Object inp);
032 }
033