Here you can find the source of castToLong(Object object)
Parameter | Description |
---|---|
object | a parameter |
public static Long castToLong(Object object)
//package com.java2s; /*/*from ww w . j a v a 2 s . co m*/ Pulsar Copyright (C) 2013-2015 eBay Software Foundation Licensed under the GPL v2 license. See LICENSE for full terms. */ public class Main { /** * Sometimes ELP's version of cast is misbehaving * * @param object * @return */ public static Long castToLong(Object object) { if (object != null) { if (object instanceof Long) return (Long) object; else return Long.valueOf(object.toString()); } return null; } }