Class EnhancedStack<E>


  • public final class EnhancedStack<E>
    extends Object
    Stack that avoids duplicated element. If an duplicated element is pushed, instead of inserting the element into the stack resulting in increase of stack size it will increment the item count counter instead.

    Caution when using this class in multiple thread as this class is not thread safe.

    • Constructor Detail

      • EnhancedStack

        public EnhancedStack()
    • Method Detail

      • getInternalStack

        Stack<io.toro.martini.util.EnhancedStack.Item> getInternalStack()
      • size

        public int size()
      • empty

        public boolean empty()