Class Index | File Index

Classes


Class UndoManager.CircularStack


Defined in: UndoManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new CircularStack.
Method Summary
Method Attributes Method Name and Description
 
Clears the stack.
<private>  
Gets the position of the previously inserted item in the buffer.
 
Checks whether the stack is empty.
 
peek()
Returns but not removes the top most item of the stack.
 
pop()
Returns and removes the top most item of the stack.
 
push(item)
Pushes a new item onto the stack.
Class Detail
UndoManager.CircularStack(maxSize)
Creates a new CircularStack. This is a stack implementation backed by a circular buffer where the oldest entries automatically are overwritten when new items are pushed onto the stack and the maximum size has been reached.
Parameters:
{Integer} maxSize Optional, Default: 32
Method Detail
clear()
Clears the stack.

<private> {Integer} getPreviousPointer()
Gets the position of the previously inserted item in the buffer.
Returns:
{Integer} the previous pointer position or null if no previous exists.

{Boolean} isEmpty()
Checks whether the stack is empty.
Returns:
{Boolean} true if empty, false otherwise.

{Any} peek()
Returns but not removes the top most item of the stack.
Returns:
{Any} the last inserted item or null if stack is empty.

{Any} pop()
Returns and removes the top most item of the stack.
Returns:
{Any} the last inserted item or null if stack is empty.

push(item)
Pushes a new item onto the stack.
Parameters:
{Any} item

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 18 2011 18:03:15 GMT+0000 (WEST)