Package org.eclipse.net4j.util

## Class CheckUtil

- java.lang.Object
- - org.eclipse.net4j.util.CheckUtil

-     public final class CheckUtil
      extends java.lang.Object

  Provides static methods that check object states and invocation arguments.
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static boolean` | `HAS_DEBUGGER_ATTACHED` |
    `static boolean` | `SANITIZE_TIMEOUT` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `checkArg​(boolean expr, java.lang.String msg)` |
    `static void` | `checkArg​(java.lang.Object handle, java.lang.String handleName)` |
    `static void` | `checkNull​(java.lang.Object handle, java.lang.String msg)` |
    `static void` | `checkState​(boolean expr, java.lang.String msg)` |
    `static void` | `checkState​(java.lang.Object handle, java.lang.String handleName)` |
    `static void` | `countDown​(java.lang.String message)` |
    `static void` | `countUp​(java.lang.String message)` |
    `static long` | `sanitizeTimeout​(long timeout)` |

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

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

- - ### Field Detail

    - #### HAS_DEBUGGER_ATTACHED

          public static final boolean HAS_DEBUGGER_ATTACHED

      Since:
        3.7

    - #### SANITIZE_TIMEOUT

          public static final boolean SANITIZE_TIMEOUT

      Since:
        3.7

  - ### Method Detail

    - #### checkNull

          public static void checkNull​(java.lang.Object handle,
                                       java.lang.String msg)
                                throws java.lang.NullPointerException

      Throws:
        `java.lang.NullPointerException`

    - #### checkArg

          public static void checkArg​(boolean expr,
                                      java.lang.String msg)
                               throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

    - #### checkArg

          public static void checkArg​(java.lang.Object handle,
                                      java.lang.String handleName)
                               throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

    - #### checkState

          public static void checkState​(boolean expr,
                                        java.lang.String msg)
                                 throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`

    - #### checkState

          public static void checkState​(java.lang.Object handle,
                                        java.lang.String handleName)
                                 throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`

    - #### countUp

          public static void countUp​(java.lang.String message)

      Since:
        3.6

    - #### countDown

          public static void countDown​(java.lang.String message)

      Since:
        3.6

    - #### sanitizeTimeout

          public static long sanitizeTimeout​(long timeout)

      Since:
        3.7