Advertisement
je0v4ne

Untitled

Sep 5th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Move o cursor adiante
  2. public void advanced() {
  3.     cursor = cursor.getNext();
  4. }
  5.  
  6. @Override
  7. public String toString() {
  8.     if (cursor == null) {
  9.         return "[]";
  10.     }
  11.     String toString = "[..." + cursor.getElement();
  12.     CNode oldCursor = cursor;
  13.     for (advanced(); oldCursor != cursor; advanced()) {
  14.         toString += ", " + cursor.getElement();
  15.     }
  16.     return toString + "...]";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement