Class ImmutableStack<T>


  • public class ImmutableStack<T>
    extends Object
    • Constructor Detail

      • ImmutableStack

        public ImmutableStack()
    • Method Detail

      • push

        public ImmutableStack<T> push​(T item)
        Returns a clone of this stack that contains the specified item at its top position.
      • pop

        public ImmutableStack<T> pop()
        Returns a clone of this stack with its top element removed.
      • peek

        public T peek()