()
| 541 | } |
| 542 | |
| 543 | Alphabet lowerCase() { |
| 544 | if (!hasUpperCase()) { |
| 545 | return this; |
| 546 | } else { |
| 547 | checkState(!hasLowerCase(), "Cannot call lowerCase() on a mixed-case alphabet"); |
| 548 | char[] lowerCased = new char[chars.length]; |
| 549 | for (int i = 0; i < chars.length; i++) { |
| 550 | lowerCased[i] = Ascii.toLowerCase(chars[i]); |
| 551 | } |
| 552 | return new Alphabet(name + ".lowerCase()", lowerCased); |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | @Override |
| 557 | public boolean matches(char c) { |
nothing calls this directly
no test coverage detected