while(nodes.hasNext()) { list.add(nodes.next()); }
return list.size();
Node result = null; try { result = list.get(index); } catch(IndexOutOfBoundsException ioobe) { // TODO log this event? return null; } return result;