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

Add maximum limit to our stack implementations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: core-collections
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: