Java Long Number Create toLong(Object value)

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

Description

to Long

License

Apache License

Declaration

public static Long toLong(Object value) 

Method Source Code

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

public class Main {

    public static Long toLong(Object value) {

        if (value == null) {
            return 0L;
        } else {/*  w ww  .  j  a v a 2  s  .  c  o  m*/
            Long longNum = new Long(value.toString());
            return longNum;
        }
    }

    public static String toString(Object value) {

        if (value == null) {
            return "";
        } else {
            return value.toString();
        }
    }
}

Related

  1. toLong(Object val)
  2. toLong(Object value)
  3. toLong(Object value)
  4. toLong(Object value)
  5. toLong(Object value)
  6. toLong(Object value)
  7. toLong(Object value)
  8. toLong(Object value)
  9. toLong(Object value, long defaultValue)