(char c)
| 114 | } |
| 115 | |
| 116 | @Override |
| 117 | public boolean matches(char c) { |
| 118 | if (c == 0) { |
| 119 | return containsZero; |
| 120 | } |
| 121 | if (!checkFilter(c)) { |
| 122 | return false; |
| 123 | } |
| 124 | int mask = table.length - 1; |
| 125 | int startingIndex = smear(c) & mask; |
| 126 | int index = startingIndex; |
| 127 | do { |
| 128 | if (table[index] == 0) { // Check for empty. |
| 129 | return false; |
| 130 | } else if (table[index] == c) { // Check for match. |
| 131 | return true; |
| 132 | } else { // Linear probing. |
| 133 | index = (index + 1) & mask; |
| 134 | } |
| 135 | // Check to see if we wrapped around the whole table. |
| 136 | } while (index != startingIndex); |
| 137 | return false; |
| 138 | } |
| 139 | |
| 140 | @Override |
| 141 | void setBits(BitSet table) { |
nothing calls this directly
no test coverage detected