code: public static final Integer getInteger(Number value)
     {
        Integer result = null;
        if (value != null)
        {
           if (value instanceof Integer)
           {
              result = (Integer) value;
           }
           else
           {
              result = Integer.valueOf((int) Math.round(value.doubleValue()));
           }
        }
        return (result);
     }
docs: Utility method used to convert an arbitrary Number into an Integer.
  
  @param value Number instance
  @return Integer instance