Java Integer Create toInt(Object o)

Here you can find the source of toInt(Object o)

Description

to Int

License

Apache License

Declaration

public static Integer toInt(Object o) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static Integer toInt(Object o) {
        if (o == null)
            return new Integer(0);
        return Integer.valueOf(o.toString());
    }/*from   w ww.  ja v  a  2s. c o  m*/
}

Related

  1. toInt(Number value)
  2. toInt(Number wrapped)
  3. toInt(Object bean, int defaultValue)
  4. toInt(Object num)
  5. toInt(Object num, int defValue)
  6. toInt(Object o, int defaultValue)
  7. toInt(Object obj)
  8. toInt(Object obj)
  9. toInt(Object obj)