class TextUtils {

    public static <T> String join( List<T> list, String separator, T nullReplacement )
    {
        if ( list == null )
        {
            return null;
        }

        List<T> objects = new ArrayList<>( list );

        if ( nullReplacement != null )
        {
            Collections.replaceAll( objects, null, nullReplacement );
        }

        return StringUtils.join( objects, separator );
    }

}