code: static Number promoteToInteger(Object wrapper )
      {
          if ( wrapper instanceof Character )
              return Integer.valueOf(((Character) wrapper).charValue());
          if ( wrapper instanceof Byte || wrapper instanceof Short )
              return Integer.valueOf(((Number) wrapper).intValue());
  
          return (Number) wrapper;
      }
docs: Promote primitive wrapper type to Integer wrapper type