All pastes #355235 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-14 11:11 UTC
rendered paste body
    public T search(T query) {
    	for(int i=0; i<this.size; i++) {
    		ListElement<T> tmp;
    		if(i==0) {
    			tmp = first;
    		} else {
    			tmp = first.next;
    		}
    		if(tmp.data.equals(query)) {
    			return tmp.data;
    		}
    		return null;
    	}
    }