Check that a string is not empty if its not null.

@param value value.
@param name parameter name for the exception message.
@return the given value.
187068
public static String notEmptyIfNotNull(String value, String name, String info) {
        if (value == null) {
            return value;
        }

        if (value.trim().length() == 0) {
            throw new IllegalArgumentException(name + " cannot be empty" + (info == null ? "" : ", " + info));
        }
        return value.trim();
    }
268889
public static void notNullOrEmpty(String parameter, String name) throws IllegalArgumentException {
		if (parameter == null || parameter.isEmpty()) {
			throw new IllegalArgumentException(name + " is null or empty.");
		}
	}
63177
static List<String> string(String name, @Nullable String value) {
    if (!Strings.isNullOrEmpty(value)) {
      return Arrays.asList("--" + name, value);
    }
    return Collections.emptyList();
  }
489415
public VarValueDefBuilder has( String name, Object value)
    {
    varValueDef_.setAnnotation( name, Objects.toString( value, null));
    return this;
    }
1294952
static List<String> integer(String name, @Nullable Integer value) {
    if (value != null) {
      return Arrays.asList("--" + name, value.toString());
    }
    return Collections.emptyList();
  }
726562
public static <T> ArgumentCheck check(String name, T value) {
        return new ArgumentCheck<>(name, value);
    }
139326
public HttpMessage queryParam(final String name, final String value) {
        if (!StringUtils.hasText(name)) {
            throw new CitrusRuntimeException("Invalid query param name - must not be empty!");
        }

        this.addQueryParam(name, value);

        final String queryParamString = queryParams.entrySet()
                .stream()
                .map(this::outputQueryParam)
                .collect(Collectors.joining(","));

        header(HttpMessageHeaders.HTTP_QUERY_PARAMS, queryParamString);
        header(DynamicEndpointUriResolver.QUERY_PARAM_HEADER_NAME, queryParamString);

        return this;
    }
617515
public static void checkNotEmpty(@Nullable String value, @NonNull String message) {
        if (value == null) {
            throw new NullPointerException(message);
        } else if (value.length() == 0) {
            throw new IllegalStateException(message);
        }
    }
693167
@NonNull
    public Parameters setString(@NonNull String name, String value) {
        return setValue(name, value);
    }
978305
public static void parameterNotEmpty(final String name, final String value) {
        if (value != null && value.length() == 0) {
            raiseError(format("Parameter '%s' is expected to NOT be empty.", name));
        }
    }
656138
@Nullable
	public static Type evaluateJavaLangType(@Nonnull final String name) {
		Check.notEmpty(name, "name");
		Type ret = null;
		for (final Type type : JAVA_LANG_VALUE_TYPES) {
			if (type.getName().equals(name.replace("java.lang.", ""))) {
				ret = type;
				break;
			}
		}
		return ret;
	}
739172
public static List<String> get(String name, @Nullable Boolean value) {
    if (value == null) {
      return Collections.emptyList();
    }
    return Arrays.asList("--" + name + "=" + value.toString());
  }
295663
public static String checkNotEmpty(final String name,
                                       final String parameter) {
        if (parameter == null || parameter.trim().length() == 0) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be filled!");
        }
        return parameter;
    }
261536
public static <T> T checkNotNull(T obj, String name) {
    if (obj == null) {
      String msg = String.format("parameter '%s' cannot be null", name);
      throw new NullPointerException(msg);
    }
    return obj;
  }
1277830
public OkRequest<T> header(final String name, final Number value) {
        return header(name, value != null ? value.toString() : null);
    }
1088511
public static boolean isEmpty(Object value) {
		return (null == value || (value instanceof String && StrUtil.isEmpty((String) value)));
	}
812618
public static <T> T validateNotEmpty(T value, String errorMsg) throws ValidateException {
		if (isEmpty(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}