Package 

Class DebugBuild

    • Method Summary

      Modifier and Type Method Description
      static void log(String tag, String msg) Log message if debug build.
      static void log(String tag, String msg, Throwable err) Log message, with error cause, if debug build.
      static void log(String tag, String fmt, Array<Object> args) Log formatted message if debug build.
      static void checkState(boolean ok, String msg) Ensure state is valid if debug build, failing with messageotherwise.
      static void checkState(boolean ok) Ensure state is valid if debug build.
      static void checkArgument(boolean ok) Ensure argument is valid if debug build.
      static <T> T checkNotNull(@Nullable() T obj) Ensure value is non-{@code null} if debug build.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • log

         static void log(String tag, String msg)

        Log message if debug build.

        Parameters:
        tag - message tag
        msg - message text
      • log

         static void log(String tag, String msg, Throwable err)

        Log message, with error cause, if debug build.

        Parameters:
        tag - message tag
        msg - message text
        err - error cause
      • log

         static void log(String tag, String fmt, Array<Object> args)

        Log formatted message if debug build.

        If {@code args} is not empty, and its last element is a throwable,then the last argument is not used for formatting, and is used as an error cause.

        Parameters:
        tag - message tag
        fmt - message text format
        args - message arguments
      • checkState

         static void checkState(boolean ok, String msg)

        Ensure state is valid if debug build, failing with messageotherwise.

        Parameters:
        ok - {@code true} if, and only if, state is valid
        msg - failure message
      • checkState

         static void checkState(boolean ok)

        Ensure state is valid if debug build.

        Parameters:
        ok - {@code true} if, and only if, state is valid
      • checkArgument

         static void checkArgument(boolean ok)

        Ensure argument is valid if debug build.

        Parameters:
        ok - {@code true} if, and only if, argument is valid
      • checkNotNull

         static <T> T checkNotNull(@Nullable() T obj)

        Ensure value is non-{@code null} if debug build.

        Parameters:
        obj - value to test