Here you can find the source of asLong(String v)
public static Long asLong(String v)
//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; } } }