From 175b2b669d2cbac8045427abaf528888203cd6ad Mon Sep 17 00:00:00 2001 From: David Wurm Date: Mon, 25 Nov 2019 22:46:17 +0100 Subject: [PATCH] final edits --- src/ChainQueue.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ChainQueue.java b/src/ChainQueue.java index 1a225a2..6337a41 100644 --- a/src/ChainQueue.java +++ b/src/ChainQueue.java @@ -38,14 +38,14 @@ public class ChainQueue implements Queue { @Override public boolean add(E input) { // Übergeben der "Data" if (first == null) { // is the first empty? - first = new Node(input); // yes? -> + first = new Node(input); // yes? -> insert the node here return true; } - return addNode(input, first); // Andernfalls die Schlage durchlaufen und dort einfügen + return addNode(input, first); // no? -> goto addNode() } - private boolean addNode(E input, Node n) { + private boolean addNode(E input, Node n) { // run through the queue and find the first "place" which is empty if (n.getNext() == null) { n.setNext(new Node(input)); return true;