Package org.wildfly.plugin.tools.util

## Class Assertions

- java.lang.Object
- - org.wildfly.plugin.tools.util.Assertions

-     public class Assertions
      extends Object

  A utility for assertions.
  Author:
    James R. Perkins

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Assertions()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static String` | `requiresNotNullOrNotEmptyParameter​(String name, String value)` | Checks if the parameter is `null` or empty and throws an `IllegalArgumentException` if it is.
    `static <E,​T extends Collection<E>> T` | `requiresNotNullOrNotEmptyParameter​(String name, T value)` | Checks if the parameter is `null` or empty and throws an `IllegalArgumentException` if it is.

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

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

- - ### Constructor Detail

    - #### Assertions

          public Assertions()

  - ### Method Detail

    - #### requiresNotNullOrNotEmptyParameter

          public static String requiresNotNullOrNotEmptyParameter​(String name,
                                                                  String value)
                                                           throws IllegalArgumentException

      Checks if the parameter is `null` or empty and throws an `IllegalArgumentException` if it is.
      Parameters:
        `name` - the name of the parameter
        `value` - the value to check
      Returns:
        the parameter value
      Throws:
        `IllegalArgumentException` - if the object representing the parameter is `null`

    - #### requiresNotNullOrNotEmptyParameter

          public static <E,​T extends Collection<E>> T requiresNotNullOrNotEmptyParameter​(String name,
                                                                                               T value)
                                                                                        throws IllegalArgumentException

      Checks if the parameter is `null` or empty and throws an `IllegalArgumentException` if it is.
      Parameters:
        `name` - the name of the parameter
        `value` - the value to check
      Returns:
        the parameter value
      Throws:
        `IllegalArgumentException` - if the object representing the parameter is `null`