@Test public void testPeek() { stacks.push(1); stacks.push(2); int e = stacks.peek(); assertEquals(2, e); assertEquals(2, stacks.size()); assertEquals(2, stacks.numElements()); }
public E peek() { return stacks.getFirst().getFirst(); }
SetOfStacks { public E peek() { return stacks.getFirst().getFirst(); } }
SetOfStacks { public E peek() { return stacks.getFirst().getFirst(); } SetOfStacks();  SetOfStacks(int capacity); }
SetOfStacks { public E peek() { return stacks.getFirst().getFirst(); } SetOfStacks();  SetOfStacks(int capacity); E push(E element); E pop(); E peek(); boolean isEmpty(); int size(); int numElements(); }
SetOfStacks { public E peek() { return stacks.getFirst().getFirst(); } SetOfStacks();  SetOfStacks(int capacity); E push(E element); E pop(); E peek(); boolean isEmpty(); int size(); int numElements();  }