Package com.oorian.html.elements
Class UndoQueue
java.lang.Object
com.oorian.html.elements.UndoQueue
A fixed-size undo queue that stores string values for undo operations.
UndoQueue maintains a bounded queue of string values, automatically discarding the oldest entries when the maximum size is exceeded. This is useful for implementing undo functionality where only a limited number of previous states need to be retained.
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UndoQueue
public UndoQueue()Creates a new empty UndoQueue.
-
-
Method Details
-
push
Pushes a value onto the undo queue. If the queue exceeds the maximum size, the oldest entry is removed.- Parameters:
value- The string value to push onto the queue.
-
pop
Pops the most recent value from the undo queue.- Returns:
- The most recently pushed string value.
-