getNextCloser method
Returns the next {@link #R_PAREN} in the stream.
@param tokenizer tokenizer over a stream of text in Well-known Text format. The next token must be R_PAREN. @return the next R_PAREN in the stream @throws ParseException if the next token is not R_PAREN @throws IOException if an I/O error occurs
Implementation
String getNextCloser(WKTTokenizer tokenizer) {
String nextWord = getNextWord(tokenizer);
if (nextWord == R_PAREN) {
return nextWord;
}
throw ArgumentError("Expected $R_PAREN token but found $nextWord");
}