@Test public void isTop() throws Exception { assertThat(uut.isTop("123")).isFalse(); uut.push("123", 123); assertThat(uut.isTop("123")).isTrue(); uut.push("456", 456); assertThat(uut.isTop("123")).isFalse(); }
public boolean isTop(final String id) { return StringUtils.isEqual(id, peekId()); }
IdStack implements Iterable<String> { public boolean isTop(final String id) { return StringUtils.isEqual(id, peekId()); } }
IdStack implements Iterable<String> { public boolean isTop(final String id) { return StringUtils.isEqual(id, peekId()); }  }
IdStack implements Iterable<String> { public boolean isTop(final String id) { return StringUtils.isEqual(id, peekId()); }  void push(String id, E item); E peek(); E pop(); boolean isEmpty(); int size(); String peekId(); void clear(); E get(final String id); boolean containsId(final String id); E remove(final String id); boolean isTop(final String id); @NonNull @Override Iterator<String> iterator(); Collection<E> values(); }
IdStack implements Iterable<String> { public boolean isTop(final String id) { return StringUtils.isEqual(id, peekId()); }  void push(String id, E item); E peek(); E pop(); boolean isEmpty(); int size(); String peekId(); void clear(); E get(final String id); boolean containsId(final String id); E remove(final String id); boolean isTop(final String id); @NonNull @Override Iterator<String> iterator(); Collection<E> values();  }