Code example for LinkedList

Methods: pop, push

0
    /** 
     * Save current iterator to the stack. 
     */ 
    private void save() 
    { 
        idxStack_.push(new Integer(idx_));
    } 
 
    /** 
     * Backtrack to the saved iterator. 
     */ 
    private void back() 
    { 
        idx_ = idxStack_.pop().intValue();
    } 
     
    /** 
     * Consume the parser then the saved iterator must be deleted. 
     */ 
    private void consume() 
    { 
        idxStack_.pop();
    } 
 
    /************************************************************************** 
     * Primitive parsers. 
     **************************************************************************/