Class EvictingStack<T>

java.lang.Object
org.cyclops.cyclopscore.datastructure.EvictingStack<T>

public class EvictingStack<T> extends Object
A stack with limited size that automatically removes elements at the bottom of the stack if required. takeLast
  • Constructor Details

    • EvictingStack

      public EvictingStack(int size)
  • Method Details

    • push

      public void push(T element)
    • pop

      public T pop()
    • maxSize

      public int maxSize()
    • currentSize

      public int currentSize()