MCPcopy Create free account
hub / github.com/apache/commons-lang / notEmpty

Method notEmpty

src/main/java/org/apache/commons/lang3/Validate.java:828–830  ·  view source on GitHub ↗

Validates that the specified argument collection is neither null nor a size of zero (no elements); otherwise throwing an exception. Validate.notEmpty(myCollection); The message in the exception is "The validated collection is empty". @param The collection ty

(final T collection)

Source from the content-addressed store, hash-verified

826 * @see #notEmpty(Collection, String, Object...)
827 */
828 public static <T extends Collection<?>> T notEmpty(final T collection) {
829 return notEmpty(collection, DEFAULT_NOT_EMPTY_COLLECTION_EX_MESSAGE);
830 }
831
832 /**
833 * <p>Validates that the specified argument map is neither {@code null}

Calls 5

toSupplierMethod · 0.95
getMessageMethod · 0.95
requireNonNullMethod · 0.45
isEmptyMethod · 0.45
lengthMethod · 0.45