Here you can find the source of castToDouble(Object object)
Parameter | Description |
---|---|
object | a parameter |
public static Double castToDouble(Object object)
//package com.java2s; /*/* ww w. j a v a 2 s . c o 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 Double castToDouble(Object object) { if (object != null) { if (object instanceof Double) return (Double) object; else return Double.valueOf(object.toString()); } return null; } }