Java Long Number Create toLong(Object value)

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

Description

to Long

License

Open Source License

Declaration

public static long toLong(Object value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long toLong(Object value) {
        return (value == null || "null".equals(value.toString())) ? 0 : Long.parseLong(value.toString().trim());
    }//from w w  w .  ja va 2s.c  om

    public static String toString(Object value) {
        return value == null || "null".equals(value.toString()) ? "" : value.toString();
    }
}

Related

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