public static void hasLength(String text, String message) { if (!StringUtils.hasLength(text)) { throw new IllegalArgumentException(message); } }
public static void hasLength(String text, String message) { if (!StringUtils.hasLength(text)) { throw new IllegalArgumentException(message); } }
public static boolean hasText(String str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(str.charAt(i))) { return true; } } return false; }
public static boolean hasText(String str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(str.charAt(i))) { return true; } } return false; }
public static void isInstanceOf(Class<?> type, Object obj, String message) { notNull(type, "Type to check against must not be null"); if (!type.isInstance(obj)) { throw new IllegalArgumentException( (StringUtils.hasLength(message) ? message + " " : "") + "Object of class [" + (obj != null ? obj.getClass().getName() : "null") + "] must be an instance of " + type); } }
public static void isInstanceOf(Class<?> type, Object obj, String message) { notNull(type, "Type to check against must not be null"); if (!type.isInstance(obj)) { throw new IllegalArgumentException( (StringUtils.hasLength(message) ? message + " " : "") + "Object of class [" + (obj != null ? obj.getClass().getName() : "null") + "] must be an instance of " + type); } }
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null);
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null);
public static void hasLength(String text, String message) { if (!StringUtils.hasLength(text)) { throw new IllegalArgumentException(message); } }
public static boolean hasText(String str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(str.charAt(i))) { return true; } } return false; }
public static void isInstanceOf(Class<?> type, Object obj, String message) { notNull(type, "Type to check against must not be null"); if (!type.isInstance(obj)) { throw new IllegalArgumentException( (StringUtils.hasLength(message) ? message + " " : "") + "Object of class [" + (obj != null ? obj.getClass().getName() : "null") + "] must be an instance of " + type); } }
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null);