API¶
-
class
javalikescanner.
JavaLikeScanner
(contents)[source]¶ A class which allows a given string to be scanned through and broken up into various tokens.
-
has_next
()[source]¶ Return whether or not there is a valid next token in the scanner or not.
Returns: Whether or not there is a next token in the scanner as a boolean.
-
has_next_int
()[source]¶ Return whether the next token in the scanner is an integer or not.
Returns: Whether or not the next token in the scanner is an integer as a boolean.
-
has_next_line
()[source]¶ Return whether or not there is a next line in the scanner.
Returns: Whether or not there is a next line in the scanner as a boolean.
-
next
()[source]¶ Return the next token in the scanner and remove that token from the scanner.
Returns None if there is no next token in the scanner.
Returns: The next token in the scanner as a string.
-