Promote primitive wrapper type to to Integer wrapper type
(Object wrapper )
| 594 | Promote primitive wrapper type to to Integer wrapper type |
| 595 | */ |
| 596 | static Object promoteToInteger(Object wrapper ) |
| 597 | { |
| 598 | if(wrapper instanceof Character) |
| 599 | return new Integer(((Character)wrapper).charValue()); |
| 600 | else if((wrapper instanceof Byte) || (wrapper instanceof Short)) |
| 601 | return new Integer(((Number)wrapper).intValue()); |
| 602 | |
| 603 | return wrapper; |
| 604 | } |
| 605 | |
| 606 | /** |
| 607 | Promote the pair of primitives to the maximum type of the two. |
no test coverage detected