Java Object to String castToString(Object object)

Here you can find the source of castToString(Object object)

Description

Sometimes ELP's version of cast is misbehaving

License

GNU General Public License

Parameter

Parameter Description
object a parameter

Declaration

public static String castToString(Object object) 

Method Source Code

//package com.java2s;
/*//  ww w.j  a  v a2 s  .c om
 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 String castToString(Object object) {
        return object == null ? null : object.toString();
    }
}

Related

  1. castString(Object o)
  2. castString(Object obj)
  3. castString(Object obj, String defaultValue)
  4. castString(Object val)
  5. castToString(Object inValue)
  6. castToString(Object value)
  7. castToStringArray(Object[] array)
  8. objectToString(final Object value)
  9. objectToString(Object a_Object)