@@ -46,11 +46,11 @@ public void addCommand(String command) {
4646 }
4747
4848 /**
49- * Moves the pointer to previous node in the list and returns the command stored.
50- * If the pointer is at the previous node at the time of calling, command stored
51- * in the first node is returned.
52- * @return Command stored in the previous node, or command stored in the head node
53- * if there is no previous node.
49+ * Moves the pointer to next node in the list and returns the command stored.
50+ * If the pointer is at the last node at the time of calling, the command
51+ * stored in the last node is returned.
52+ * @return Command stored in the next node, or command stored in the tail node if the
53+ * pointer is at the last node.
5454 */
5555 public String moveDown () {
5656 if (cursor .nextNode != tailPointer && cursor .nextNode != null ) {
@@ -60,11 +60,11 @@ public String moveDown() {
6060 }
6161
6262 /**
63- * Moves the pointer to next node in the list and returns the command stored.
64- * If the pointer is at the last node at the time of calling, the command
65- * stored in the last node is returned.
66- * @return Command stored in the next node, or command stored in the tail node if the
67- * pointer is at the last node.
63+ * Moves the pointer to previous node in the list and returns the command stored.
64+ * If the pointer is at the previous node at the time of calling, command stored
65+ * in the first node is returned.
66+ * @return Command stored in the previous node, or command stored in the head node
67+ * if there is no previous node.
6868 */
6969 public String moveUp () {
7070 if (cursor .prevNode != null ) {
0 commit comments