public T search(T query) { for(int i=0; i tmp; if(i==0) { tmp = first; } else { tmp = first.next; } if(tmp.data.equals(query)) { return tmp.data; } return null; } }