/**
 * This class provides a linked list, optimized for node access speed.
 * <br><br>
 * <a href="mailto:ehudsons@andrew.cmu.edu">Ellen Hudson-Snyder</a>, 
 * <a href="mailto:evedar@andrew.cmu.edu">Elvin Vedar</a>,
 * <a href="mailto:cbalz@andrew.cmu.edu">Christopher M. Balz</a>.
 * <br><br>CVS Version Info:<br>
 *  $Id: FastLinkedList.js,v 1.3 2005/10/31 04:46:24 cbalz Exp $
 * <br><br>
 * @object-prop <code>object</code> <code>objHead</code> The head node of the linked list.
 * @author Team GigaToasted (Fall-2005-CMU-NASA/Google-Practicum Subteam) 
 * @version 1.0
 */


/**
 * Create a <code>FastLinkedList</code>.
 */
function FastLinkedList() {
    this.objHead = null;

    // Methods:
    this.add = FastLinkedList_add;
}


/**
 * Add a node to the end of the linked list.
 * @param pAnyData  Any data to insert into the new list node.  The data may be of 
 *                  any type.
 */
function FastLinkedList_add(pAnyData) {
    var objNode = this.objHead;
    if (!objNode) {
        this.objHead = new FastNode(pAnyData);
        return;
    }

    while (objNode.objNext) {
        objNode = objNode.objNext;
    }
    objNode.objNext = new FastNode(pAnyData);
}
