Code example for LinkedList

Methods: clear

0
 
    /** 
     * Clear history. 
     */ 
    public void clearHistory() { 
        history.clear();
        historyPointer = 0;
    } 
 
    /** 
     * Remember an edit session for the undo history. If the history maximum 
     * size is reached, old edit sessions will be discarded. 
     * 
     * @param editSession 
     */ 
    public void remember(EditSession editSession) {
        // Don't store anything if no changes were made 
        if (editSession.size() == 0) return;
 
        // Destroy any sessions after this undo point