Any
Fallback
This function provides a fallback value if the object it's called on is null
.
Parameters:
value
(the fallback value of typeT
).Process: Returns
this
if it is notnull
; otherwise, returns the providedvalue
.Return: A non-null value of type
T
.
Example:
Is Not Null
This function checks if the object is not null
.
Return:
true
if the object is notnull
, otherwisefalse
.
Example:
Is Null
This function checks if the object is null
.
Return:
true
if the object isnull
, otherwisefalse
.
Example:
To Selectable
This function converts a list to a list of Selectable
objects.
Return: A list of
Selectable
objects if the original list is notnull
; otherwise, an empty list.
Example:
Last updated