@Test public void testToString(){ assertEquals(0, k.size()); assertEquals("", k.toString()); k.add(testString); assertEquals(testString, k.toString()); }
@Override public String toString() { String s = ""; Key current = head; while (current != null) { s += current.getValue(); current = current.getNext(); } return s; }
KeyBuffer { @Override public String toString() { String s = ""; Key current = head; while (current != null) { s += current.getValue(); current = current.getNext(); } return s; } }
KeyBuffer { @Override public String toString() { String s = ""; Key current = head; while (current != null) { s += current.getValue(); current = current.getNext(); } return s; } KeyBuffer(); }
KeyBuffer { @Override public String toString() { String s = ""; Key current = head; while (current != null) { s += current.getValue(); current = current.getNext(); } return s; } KeyBuffer(); void add(String s); int size(); @Override String toString(); String drain(); void free(); }
KeyBuffer { @Override public String toString() { String s = ""; Key current = head; while (current != null) { s += current.getValue(); current = current.getNext(); } return s; } KeyBuffer(); void add(String s); int size(); @Override String toString(); String drain(); void free();  }