Convert this builder into an array of char[]s where the maximum index is the value of the highest character that has been seen. The array will be sparse in the sense that any unseen index will default to null. @return a "sparse" array that holds the replacement mappings.
()
| 123 | |
| 124 | |
| 125 | public char[][] toArray() { |
| 126 | char[][] result = new char[max + 1][]; |
| 127 | for (Map.Entry<Character, String> entry : map.entrySet()) { |
| 128 | result[entry.getKey()] = entry.getValue().toCharArray(); |
| 129 | } |
| 130 | return result; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Convert this builder into a char escaper which is just a decorator around the underlying array |
no test coverage detected