@Override
        public boolean hasNext() {
            return index <= last;
        }
Handles running the Kafka metadata shell in interactive mode, where we accept input in real time.
shell/src/main/java/org/apache/kafka/shell/InteractiveShell.java