public static long longValue(Object value)
        throws NumberFormatException
    {
        if (value == null) return 0L;
        Class c = value.getClass();
        if (c.getSuperclass() == Number.class) return ((Number) value).longValue();
        if (c == Boolean.class) return ((Boolean) value).booleanValue() ? 1 : 0;
        if (c == Character.class) return ((Character) value).charValue();
        return Long.parseLong(stringValue(value, true));
    }
public static long longValue(Object value)
        throws NumberFormatException
    {
        if (value == null) return 0L;
        Class c = value.getClass();
        if (c.getSuperclass() == Number.class) return ((Number) value).longValue();
        if (c == Boolean.class) return ((Boolean) value).booleanValue() ? 1 : 0;
        if (c == Character.class) return ((Character) value).charValue();
        return Long.parseLong(stringValue(value, true));
    }
public static long longValue ( Object value ) throws NumberFormatException { if ( value == null ) return 0L ; Class c = value . getClass ( ) ; if ( c . getSuperclass ( ) == Number . class ) return ( ( Number ) value ) . longValue ( ) ; if ( c == Boolean . class ) return ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ; if ( c == Character . class ) return ( ( Character ) value ) . charValue ( ) ; return Long . parseLong ( stringValue ( value , true ) ) ; }
Evaluates the given object as a long integer.

@param value
an object to interpret as a long integer
@return the long integer value implied by the given object
@throws NumberFormatException
if the given object can't be understood as a long integer
Evaluates the given object as a long integer .