()
| 528 | } |
| 529 | |
| 530 | Alphabet upperCase() { |
| 531 | if (!hasLowerCase()) { |
| 532 | return this; |
| 533 | } else { |
| 534 | checkState(!hasUpperCase(), "Cannot call upperCase() on a mixed-case alphabet"); |
| 535 | char[] upperCased = new char[chars.length]; |
| 536 | for (int i = 0; i < chars.length; i++) { |
| 537 | upperCased[i] = Ascii.toUpperCase(chars[i]); |
| 538 | } |
| 539 | return new Alphabet(name + ".upperCase()", upperCased); |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | Alphabet lowerCase() { |
| 544 | if (!hasUpperCase()) { |
nothing calls this directly
no test coverage detected