

package lrs.visitor;



import lrs.*;

public class GetLast

 implements IAlgo

{

 public static GetLast Singleton = new GetLast();



 private GetLast() {}

 

 public Object emptyCase(LRStruct host, Object... param)  {

  return(((LRStruct) param[0]).getFirst());

 }



 public Object nonEmptyCase(LRStruct host, Object... param) {

  return(host.getRest().execute(this,host));

 }

}



