package rac; import lrs.*; /** * LIFO RAC. * @author Mathias Ricken - Copyright 2008 - All rights reserved. */ public class LRSStackFactory extends ALRSRACFactory { /** * Create a ``last-in, first-out'' (LIFO) container. */ public IRAContainer makeRAC() { return new LRSRAContainer(new IAlgo,T>() { public LRStruct emptyCase(LRStruct host, T... input) { return host.insertFront(input[0]); } public LRStruct nonEmptyCase(LRStruct host, T... input) { return host.insertFront(input[0]); } }); } }