Java String to Long asLong(String v)

Here you can find the source of asLong(String v)

Description

as Long

License

Apache License

Declaration

public static Long asLong(String v) 

Method Source Code

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

public class Main {
    public static Long asLong(String v) {
        try {/*from ww w  .j  a v a 2s .  c om*/
            return (v != null) ? Long.valueOf(v) : null;
        } catch (NumberFormatException ex) {
            return null;
        }
    }
}

Related

  1. asLong(String param)
  2. asLong(String str)
  3. asLong(String str, long defaultValue)
  4. asLong(String string)
  5. asLong(String value)
  6. asLong(String value)
  7. atol(final String str, final long def)
  8. atol(String pString_)