Java Null Value Convert Null2Space(String str)

Here you can find the source of Null2Space(String str)

Description

Null Space

License

Open Source License

Declaration

public static String Null2Space(String str) 

Method Source Code

//package com.java2s;
/**/*from  w  w w .j a v  a 2 s . c om*/
 *  ETRI Distributed Resource/Mediation System for new re-generation Energy Exchange
 *
 *  Copyright ? [2016] ETRI. All rights reserved.
 *
 *    This is a proprietary software of ETRI, and you may not use this file except in
 *  compliance with license agreement with ETRI. Any redistribution or use of this
 *  software, with or without modification shall be strictly prohibited without prior written
 *  approval of ETRI, and the copyright notice above does not evidence any actual or
 *  intended publication of such software.
 *
 * com.nc.common.utils : StringUtil.java
 * @author creme55
 * @since 2016. 10. 12.
 * @version 1.0
 * @see 
 * @Copyright ? [2016] By ETRI. All rights reserved.
 *
 * <pre>
 * << ??????(Modification Information) >>
 *      ?????              ????                  ????
 *  -------------        -----------       -------------------------
 *  2016. 10. 12.          creme55         ?? ???(???? ?? ????)              
 *
 * </pre>
 **/

public class Main {

    public static String Null2Space(String str) {

        if (str == null)
            return "";
        else if (str.equals("null") || str.equals("NULL"))
            return "";
        else
            return str;
    }

    public static boolean equals(String str1, String str2) {
        return (str1 == null ? str2 == null : str1.equals(str2));
    }
}

Related

  1. null2empty(String str)
  2. null2emptyString(String value)
  3. null2Int(Object object, int def)
  4. null2Length0(String s)
  5. null2NA(String str)
  6. null2Str(Object obj)
  7. null2Str(String str)
  8. null2String(Object obj)
  9. null2String(String str)