Class Topped<Element>

java.lang.Object
org.dmfs.jems2.stack.Topped<Element>
Type Parameters:
Element - The type of the elements on the Stack.
All Implemented Interfaces:
Stack<Element>

public final class Topped<Element> extends Object implements Stack<Element>
A Stack based on another Stack and a new top element.
  • Constructor Details

    • Topped

      public Topped(Element element, Stack<Element> bottom)
      Creates a new Stack with the given element on top and the given Stack underneath.
      Parameters:
      element - The top element of the Stack.
      bottom - The Stack underneath the top element.
  • Method Details