Here you can find the source of formatLong(String value)
Parameter | Description |
---|---|
value | The value validation is being performed on. |
public static Long formatLong(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww . java2 s.c o m*/ * Checks if the value can safely be converted to a long primitive. * * @param value The value validation is being performed on. * @return format result */ public static Long formatLong(String value) { if (value == null) { return null; } try { return new Long(value); } catch (NumberFormatException e) { return null; } } }