IllegalStateException
if no match has been performed, or if the last match was not successful. The various next
methods of Scanner
make a match result available if they complete without throwing an exception. For instance, after an invocation of the {@link #nextInt}method that returned an int, this method returns a MatchResult
for the search of the Integer regular expression defined above. Similarly the {@link #findInLine}, {@link #findWithinHorizon}, and {@link #skip} methods will make amatch available if they succeed.
@return a match result for the last match operation
@throws IllegalStateException If no match result is available
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|