/* * File: ZHLinkedHealTailList.java */ package zhstructures; /** * Class implementing the ZHHeadTailList interface as a ZHOneWayLinkedStructure. * * @author J. Andrew Holey * @version January 16, 2009 */ public class ZHLinkedHeadTailList extends ZHOneWayLinkedStructure> implements ZHHeadTailList { /** * Creates a new empty list. */ public ZHLinkedHeadTailList() { super(); } /** * Creates a new list with the specified head element and tail. * * @param headElement the element to be at the head of the new list * @param tail the list to be the tail of the new list */ public ZHLinkedHeadTailList(ElementType headElement, ZHLinkedHeadTailList tail) { super(headElement, tail); } /* (non-Javadoc) * @see zhstructures.ZHHeadTailList#head() */ @Override public ElementType head() { return this.element; } /* (non-Javadoc) * @see zhstructures.ZHHeadTailList#tail() */ @Override public ZHHeadTailList tail() { return this.next; } }