Package picocli

Class CommandLine.Assert

java.lang.Object
picocli.CommandLine.Assert
Enclosing class:
CommandLine

private static final class CommandLine.Assert extends Object
Utility class providing some defensive coding convenience methods.
  • Constructor Details

    • Assert

      private Assert()
  • Method Details

    • notNull

      static <T> T notNull(T object, String description)
      Throws a NullPointerException if the specified object is null.
      Type Parameters:
      T - type of the object to check
      Parameters:
      object - the object to verify
      description - error message
      Returns:
      the verified object
    • equals

      static boolean equals(Object obj1, Object obj2)
    • hashCode

      static int hashCode(Object obj)
    • hashCode

      static int hashCode(boolean bool)
    • assertTrue

      static void assertTrue(boolean condition, String message)
    • assertTrue

      static void assertTrue(boolean condition, CommandLine.IHelpSectionRenderer producer)