Java Assert assertNotEmpty(String value, String message)

Here you can find the source of assertNotEmpty(String value, String message)

Description

assert Not Empty

License

Open Source License

Declaration

public static void assertNotEmpty(String value, String message) 

Method Source Code

//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

public class Main {
    public static void assertNotEmpty(String value, String message) {
        if (value == null || "".equals(value)) {
            throw new IllegalArgumentException(message);
        }/*from  w  w w .  ja va  2 s.c om*/
    }
}

Related

  1. assertNotBlank(final String value, final String exceptionMessage)
  2. assertNotBlank(final String... strings)
  3. assertNotBlankOrThrowException(final String... strings)
  4. assertNotEmpty(final String str)
  5. assertNotEmpty(String string, String exceptionMessageTitle)
  6. assertNotEmptyString(final String s)
  7. assertNotEquals(final Object actual, final Object expected, final String name)
  8. assertNotMatches(String name, String regExp, String actual)
  9. assertNotTrue(boolean conditionThatMustNotBeTrue, String msgWhenTrue)