()
| 42 | } |
| 43 | |
| 44 | public String toString() { |
| 45 | StringBuilder builder = new StringBuilder(); |
| 46 | builder.append("["); |
| 47 | if (inversePattern) { |
| 48 | builder.append("^"); |
| 49 | } |
| 50 | for (int i = 0; i < map.length; ++ i) { |
| 51 | if (!map[i]) { |
| 52 | continue; |
| 53 | } |
| 54 | builder.append(i >= ' ' && i <= 0x7f ? |
| 55 | "" + (char)i : ("\\x" + Integer.toHexString(i))); |
| 56 | int j = i + 1; |
| 57 | while (j < map.length && map[j]) { |
| 58 | ++ j; |
| 59 | } |
| 60 | -- j; |
| 61 | if (j > i) { |
| 62 | if (j > i + 1) { |
| 63 | builder.append('-'); |
| 64 | } |
| 65 | builder.append(j >= ' ' && j <= 0x7f ? |
| 66 | "" + (char)j : ("\\x" + Integer.toHexString(j))); |
| 67 | i = j; |
| 68 | } |
| 69 | } |
| 70 | builder.append("]"); |
| 71 | return builder.toString(); |
| 72 | } |
| 73 | |
| 74 | private static String specialClass(int c) { |
| 75 | if ('d' == c) { |
nothing calls this directly
no test coverage detected