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

Method push

annotations/StackL.java:11–11  ·  view source on GitHub ↗
(T v)

Source from the content-addressed store, hash-verified

9public class StackL<T> {
10 private LinkedList<T> list = new LinkedList<>();
11 public void push(T v) { list.addFirst(v); }
12 public T top() { return list.getFirst(); }
13 public T pop() { return list.removeFirst(); }
14}

Callers 3

tPushMethod · 0.45
tPopMethod · 0.45
tTopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected