This method takes a tokenizer and tries to return an integer value for the next available token. If the next value doesn't exist or is not an integer the default value is returned. @param tok The StringTokenizer to pull the token from @param defaultVal The value to return if we can't get an integer
(StringTokenizer tok, int defaultVal)
| 69 | * make an integer from the next token. |
| 70 | */ |
| 71 | protected static int getIntToken(StringTokenizer tok, int defaultVal) |
| 72 | { |
| 73 | int retInt = defaultVal; |
| 74 | if (tok.hasMoreTokens()) |
| 75 | { |
| 76 | retInt = getIntToken(tok.nextToken(), defaultVal); |
| 77 | } |
| 78 | return retInt; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * This is a utility method to safely get an int value from a token. If the |
no test coverage detected