package list.dl.algo; import list.dl.DLList; import java.io.*; /** * Prints the right side of the host from where the host is to the left end. */ public class PrintRight implements IAlgoRight { final public static PrintRight Singleton = new PrintRight(); private PrintRight() { } /** * @param host * @param input * @return */ public Object rightEndCase(DLList host, Object input) { return null; } /** * @param hostList * @param inputParam * @return */ public Object dataNodeCase(DLList host, Object input) { System.out.print (" " + host.getRightFirst ()); host.getRightRest ().executeRight (this, null); return null; } }