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