if operand is a Character or a String with one character, return that character's int value.
(final Comparable operand)
| 576 | * if operand is a Character or a String with one character, return that character's int value. |
| 577 | */ |
| 578 | private static Comparable normaliseStringType(final Comparable operand) { |
| 579 | if (operand instanceof Character) { |
| 580 | return (int) (Character) operand; |
| 581 | } |
| 582 | if (operand instanceof String string) { |
| 583 | |
| 584 | if (string.length() == 1) { |
| 585 | return (int) string.charAt(0); |
| 586 | } |
| 587 | return string; |
| 588 | } |
| 589 | return operand; |
| 590 | } |
| 591 | } |
no test coverage detected