Class ImmutableStack<T>
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.structure.util.ImmutableStack<T>
-
public class ImmutableStack<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description ImmutableStack()
ImmutableStack(ImmutableStack<T> other)
Creates a clone of the specifiedImmutableStack
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
peek()
ImmutableStack<T>
pop()
Returns a clone of this stack with its top element removed.ImmutableStack<T>
push(T item)
Returns a clone of this stack that contains the specified item at its top position.
-
-
-
Constructor Detail
-
ImmutableStack
public ImmutableStack()
-
ImmutableStack
public ImmutableStack(ImmutableStack<T> other)
Creates a clone of the specifiedImmutableStack
.
-
-
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()
-
-