public class Stacks extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
peek(List<T> stack)
Returns the most recently added element in the stack.
|
static <T> void |
pop(List<T> stack,
T element)
Removes an element from the stack.
|
static <T> void |
push(List<T> stack,
T element)
Adds an element to the stack.
|
public static <T> T peek(List<T> stack)
public static <T> void push(List<T> stack, T element)
public static <T> void pop(List<T> stack, T element)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.