MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / push

Method push

onjava/Stack.java:12–12  ·  view source on GitHub ↗
(T v)

Source from the content-addressed store, hash-verified

10public class Stack<T> {
11 private Deque<T> storage = new ArrayDeque<>();
12 public void push(T v) { storage.push(v); }
13 public T peek() { return storage.peek(); }
14 public T pop() { return storage.pop(); }
15 public boolean isEmpty() { return storage.isEmpty(); }

Callers 4

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.45

Calls

no outgoing calls

Tested by 2

mainMethod · 0.76
mainMethod · 0.36