Java Type Coerce coerceToString(Object object)

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

Description

coerce To String

License

Open Source License

Declaration

public static String coerceToString(Object object) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String coerceToString(Object object) {
        return coerceToString(object, null);
    }//  w  ww. ja  va2s . c  om

    public static String coerceToString(Object object, String defaultValue) {
        return (object != null) ? object.toString() : defaultValue;
    }
}

Related

  1. coerceIntoComboId(Long entityId)
  2. coerceIntoEntityId(Long comboId)
  3. coerceTagValueInt(String tag, Object val)
  4. coerceToDouble(Object o)
  5. coerceToEntrySize(String s)
  6. coerceToType(Object objectIn, Class clazz)
  7. coerceTypes(Class clazz, Object value)
  8. coerceTypes(Class clazz, Object value)