Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-1022

Add maximum limit to our stack implementations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1
    • core-collections
    • None

    Description

      In an obvious use case for a stack: namely the TextPane "undo" stack, the "Stack" class was not used because there is an enforced limit, which was not a feature of our stack class. So, adding an optional limit would allow this use case without duplicating code.

      The limit would check after a "push" operation to see if the total stack depth then exceeds the limit, which would then remove the oldest element in that case. (This is the way the code in TextPane works.)

      Attachments

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            rwhitcomb Roger Lee Whitcomb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: