51Degrees Pipeline for Java

fiftyone.pipeline.util.Check Class Reference

Detailed Description

Helper to guard that an argument fulfills its contract.

Static Public Member Functions

static void guard (boolean condition, String message)
 Throw an IllegalArgumentException if a condition is not met.
static< T > T getNotNull (T value, String message)
 Checks if a value is null, and throws an IllegalArgumentException if it is.
static boolean notNullOrBlank (String arg)
static boolean isNullOrBlank (String arg)
static boolean fileExists (String pathString)
static boolean notFileExists (String pathString)

Member Function Documentation

◆ getNotNull()

static< T > T fiftyone.pipeline.util.Check.getNotNull ( T value,
String message )
static

Checks if a value is null, and throws an IllegalArgumentException if it is.

Parameters
valueto check
messagemessage to add to the exception if one is thrown
<T>type of the value
Returns
the value that was checked

◆ guard()

void fiftyone.pipeline.util.Check.guard ( boolean condition,
String message )
static

Throw an IllegalArgumentException if a condition is not met.

Parameters
conditionresult of a conditional expression
messagemessage to add to the exception if one is thrown