Package com.csse3200.game.ui.terminal
Interface Shell.Console
- Enclosing class:
Shell
public static interface Shell.Console
An interface for abstracting read/write operations, allowing the Shell to
work with different input/output sources, such as a standard console or a
network socket.
-
Method Summary
-
Method Details
-
print
Prints any generic object to the output.- Parameters:
obj
- The object to print. NOTE: It is assumed that calls to the print method are cheap, Therefore, this should probably be buffered
-
next
String next()Reads a line / block to be Interpreter from the input.- Returns:
- The line read from the input source.
-
hasNext
boolean hasNext()Checks if there is another chunk to be read.- Returns:
- true if there is a next line, false otherwise.
-
close
void close()Closes the console's underlying resources.
-