/** * Returns true if the input is null, or is a zero length string (excluding leading/trailing whitespace). */ public static boolean isBlank(String input) { return InternalCommonsUtils.isBlank(input); }
/** * Returns true if the input is null, or is a zero length string (excluding leading/trailing whitespace). */ public static boolean isBlank(String input) { return InternalCommonsUtils.isBlank(input); }
private static final String join(String firstList, String optionalSecondList) { if (InternalCommonsUtils.isBlank(optionalSecondList)) return firstList; return firstList + "," + optionalSecondList; }
public static boolean isNonBlank(String input) { return !isBlank(input); }
@Override public T coerce(String input) { if (InternalCommonsUtils.isBlank(input)) return null; T result = stringToEnum.get(input); if (result == null) { String message = String.format("Input '%s' does not identify a value from enumerated type %s.", input, enumClass.getName()); throw new UnknownValueException(message, new AvailableValues(enumClass.getName() + " enum constants", stringToEnum)); } return result; }