Java Long Number Create toLong(Object _inStrObj)

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

Description

to Long

License

Open Source License

Declaration

public static long toLong(Object _inStrObj) 

Method Source Code

//package com.java2s;

public class Main {

    public static long toLong(Object _inStrObj) {
        if (_inStrObj == null || _inStrObj.toString().trim().equals("")) {
            return 0;
        } else {//from   w  w  w.ja  va 2 s  .c om
            return Long.valueOf(_inStrObj.toString()).longValue();
        }
    }
}

Related

  1. toLong(Integer i)
  2. toLong(long[] array)
  3. toLong(Number n)
  4. toLong(Number n)
  5. toLong(Number num)
  6. toLong(Object _value, long _default)
  7. toLong(Object cell)
  8. toLong(Object expectInt)
  9. toLong(Object num)