Java Integer Create toInt(Object obj)

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

Description

to Int

License

BSD License

Declaration

public static int toInt(Object obj) 

Method Source Code

//package com.java2s;
/*L/*  ww  w.  j a  v a  2s .com*/
 * Copyright Washington University in St. Louis, SemanticBits, Persistent Systems, Krishagni.
 *
 * Distributed under the OSI-approved BSD 3-Clause License.
 * See http://ncip.github.com/wustl-common-package/LICENSE.txt for details.
 */

public class Main {
    public static int toInt(Object obj) {
        int value = 0;
        if (obj == null)
            return value;
        else {
            Integer intObj = (Integer) obj;
            value = intObj.intValue();
            return value;
        }
    }
}

Related

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