All pastes #335146 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-01 04:01 UTC
rendered paste body
    /**
     * Removes and returns the first element from this list.
     * Returns <code>null</code> if the list is empty.
     */
    public T removeFirst() {
        if(size==0) {
            return null;
        } else {
            T tmp = first;
            first = ListElement.next; // REMOVE HERE!!!
            return tmp;
    }