Gets whether a next (more recent) command is available in the history. @return true if a next command is available, returns false otherwise.
()
| 63 | * returns {@code false} otherwise. |
| 64 | */ |
| 65 | public boolean hasNextCommand() { |
| 66 | if (this.iterator == null) { |
| 67 | return false; |
| 68 | } |
| 69 | if (!this.iteratorAsc) { |
| 70 | this.iterator.next(); // Current command, ascending. |
| 71 | this.iteratorAsc = true; |
| 72 | } |
| 73 | return this.iterator.hasNext(); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Gets the next (more recent) command from the history. |
no test coverage detected