Package org.jsoup.helper

## Class Validate

- java.lang.Object
- - org.jsoup.helper.Validate

    public final class Validate
    extends java.lang.Object

Simple validation methods. Designed for jsoup internal use

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `fail​(java.lang.String msg)` Cause a failure.
`static void` `isFalse​(boolean val)` Validates that the value is false
`static void` `isFalse​(boolean val, java.lang.String msg)` Validates that the value is false
`static void` `isTrue​(boolean val)` Validates that the value is true
`static void` `isTrue​(boolean val, java.lang.String msg)` Validates that the value is true
`static void` `noNullElements​(java.lang.Object[] objects)` Validates that the array contains no null elements
`static void` `noNullElements​(java.lang.Object[] objects, java.lang.String msg)` Validates that the array contains no null elements
`static void` `notEmpty​(java.lang.String string)` Validates that the string is not null and is not empty
`static void` `notEmpty​(java.lang.String string, java.lang.String msg)` Validates that the string is not null and is not empty
`static void` `notNull​(java.lang.Object obj)` Validates that the object is not null
`static void` `notNull​(java.lang.Object obj, java.lang.String msg)` Validates that the object is not null
`static void` `wtf​(java.lang.String msg)` Blow up if we reach an unexpected state.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### notNull

    public static void notNull​(@Nullable
                               java.lang.Object obj)

Validates that the object is not null

Parameters:
  `obj` - object to test

#### notNull

    public static void notNull​(@Nullable
                               java.lang.Object obj,
                               java.lang.String msg)

Validates that the object is not null

Parameters:
  `obj` - object to test
  `msg` - message to output if validation fails

#### isTrue

    public static void isTrue​(boolean val)

Validates that the value is true

Parameters:
  `val` - object to test

#### isTrue

    public static void isTrue​(boolean val,
                              java.lang.String msg)

Validates that the value is true

Parameters:
  `val` - object to test
  `msg` - message to output if validation fails

#### isFalse

    public static void isFalse​(boolean val)

Validates that the value is false

Parameters:
  `val` - object to test

#### isFalse

    public static void isFalse​(boolean val,
                               java.lang.String msg)

Validates that the value is false

Parameters:
  `val` - object to test
  `msg` - message to output if validation fails

#### noNullElements

    public static void noNullElements​(java.lang.Object[] objects)

Validates that the array contains no null elements

Parameters:
  `objects` - the array to test

#### noNullElements

    public static void noNullElements​(java.lang.Object[] objects,
                                      java.lang.String msg)

Validates that the array contains no null elements

Parameters:
  `objects` - the array to test
  `msg` - message to output if validation fails

#### notEmpty

    public static void notEmpty​(@Nullable
                                java.lang.String string)

Validates that the string is not null and is not empty

Parameters:
  `string` - the string to test

#### notEmpty

    public static void notEmpty​(@Nullable
                                java.lang.String string,
                                java.lang.String msg)

Validates that the string is not null and is not empty

Parameters:
  `string` - the string to test
  `msg` - message to output if validation fails

#### wtf

    public static void wtf​(java.lang.String msg)

Blow up if we reach an unexpected state.

Parameters:
  `msg` - message to think about

#### fail

    public static void fail​(java.lang.String msg)

Cause a failure.

Parameters:
  `msg` - message to output.