- java.lang.Object
-
- picocli.codegen.util.Assert
-
public final class Assert extends Object
Utility class providing some defensive coding convenience methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
equals(Object obj1, Object obj2)
static int
hashCode(boolean bool)
static int
hashCode(Object obj)
static <T> T
notNull(T object, String description)
Throws a NullPointerException if the specified object is null.
-
-
-
Method Detail
-
notNull
public 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 verifydescription
- error message- Returns:
- the verified object
-
hashCode
public static int hashCode(Object obj)
-
hashCode
public static int hashCode(boolean bool)
-
-