Class UndoQueue

java.lang.Object
com.oorian.html.elements.UndoQueue

public class UndoQueue extends Object
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 Details

    • UndoQueue

      public UndoQueue()
      Creates a new empty UndoQueue.
  • Method Details

    • push

      public void push(String value)
      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

      public String pop()
      Pops the most recent value from the undo queue.
      Returns:
      The most recently pushed string value.