Java Integer Create toInteger(Object _inStrObj)

Here you can find the source of toInteger(Object _inStrObj)

Description

to Integer

License

Open Source License

Declaration

public static int toInteger(Object _inStrObj) 

Method Source Code

//package com.java2s;

public class Main {

    public static int toInteger(Object _inStrObj) {
        if (_inStrObj == null || _inStrObj.toString().trim().equals("")) {
            return 0;
        } else {/*from   w w  w  .ja va 2s .c  o m*/
            return new Integer(_inStrObj.toString()).intValue();
        }
    }
}

Related

  1. toInteger(Long l)
  2. toInteger(long n)
  3. toInteger(Number n)
  4. toInteger(Number n)
  5. toInteger(Number number)
  6. toInteger(Object _value, int _default)
  7. toInteger(Object anObj)
  8. toInteger(Object cell)
  9. toInteger(Object o)