require

protected fun require(@Nullable nullableOpMode: BunyipsOpMode): BunyipsOpMode

Null assertion for the opMode field which throws a NullPointerException if an active BunyipsOpMode is not present (i.e. the supplied field is null). This method replicates Objects.requireNonNull but has a built-in message to alert the user of a non-active OpMode.

Return

the non-null BunyipsOpMode which can be used without compiler issues

Since

5.1.0

Parameters

nullableOpMode

Nullable OpMode field

Throws

if the OpMode field is null