All pastes #335325 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-01 07:32 UTC
rendered paste body
    /**
     * Inserts the given element at the end of this list.
     */
    public void addLast(T element) {
        if(size==0) {
            last = new ListElement<T>(element);
        } else {
            ListElement<T> tmp = last;
            last = new ListElement<T>(element);
            tmp.next = last;
        }
        size++;
    }