Class FixedSizeStack<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>

    public class FixedSizeStack<E>
    extends Stack<E>
    Creates a fixed size stack. The oldest (or deepest) item on the stack will be removed when the max size is achieved.
    • Field Summary

      • Fields inherited from class ghidra.util.datastruct.Stack

        list
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedSizeStack​(int maxSize)
      Creates a fixed size stack with the specified max size.
    • Constructor Detail

      • FixedSizeStack

        public FixedSizeStack​(int maxSize)
        Creates a fixed size stack with the specified max size.
        Parameters:
        maxSize - the max size of the stack
    • Method Detail

      • push

        public E push​(E item)
        Description copied from class: Stack
        Pushes an item onto the top of this stack.
        Overrides:
        push in class Stack<E>
        Parameters:
        item - the object to push onto the stack.
      • add

        public void add​(E item)
        Description copied from class: Stack
        Appends the given item to the top of the stack.
        Overrides:
        add in class Stack<E>
        Parameters:
        item - the new top of the stack
      • remove

        public E remove​(int index)