1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
|
public void put(E element) {
Entry<E> entry = new Entry<E>(element, null);
if (this.size == 0) {
this.firstEntry = entry;
} else {
Entry<E> currentEntry = this.lastEntry;
currentEntry.setNext(entry);
}
this.lastEntry = entry; //wird immer ausgeführt
this.size++;
} |