Alias for legacyNullTest.
Alias for legacyNullTest. This method allows one to encapsulate any object in a Box in a null-safe manner, returning Empty if the specified value is null.
Full(in) if in
is not null Empty otherwise
Apply the specified PartialFunction to the specified value and return the result in a Full Box; if the pf is undefined at that point return Empty.
Apply the specified PartialFunction to the specified value and return the result in a Full Box; if the pf is undefined at that point return Empty.
the value to transform
the partial function to use to transform the value
a Full box containing the transformed value if pf.isDefinedAt(value); Empty otherwise
Apply the specified PartialFunction to the specified value and return the result in a Full Box; if the pf is undefined at that point return Empty.
Apply the specified PartialFunction to the specified value and return the result in a Full Box; if the pf is undefined at that point return Empty.
the partial function to use to transform the value
the value to transform
a Full box containing the transformed value if pf.isDefinedAt(value); Empty otherwise
Transform a List with zero or one elements to a Box.
Transform a List with zero or one elements to a Box.
a Box object containing the head of a List. Full(x) if the List contains at least one element and Empty otherwise.
Create a Box from the specified Box, checking for null.
Create a Box from the specified Box, checking for null.
Full(x) if in is Full(x) and x is not null Empty otherwise
Create a Box from the specified Option.
Create a Box from the specified Option.
a Box created from an Option. Full(x) if the Option is Some(x) and Empty otherwise
Create a Full box containing the specified value if in
is of
type B
; Empty otherwise.
Create a Full box containing the specified value if in
is of
type B
; Empty otherwise.
This implicit transformation allows one to use a Box as an Iterable
This implicit transformation allows one to use a Box as an Iterable
List(in) if this Box is Full(in); Nil otherwise
This implicit transformation allows one to use a Box as an Option.
This implicit transformation allows one to use a Box as an Option.
Some(in)
if this Box is Full(in)
; None otherwise
Create a Full box containing the specified value if "in" is an instance of the specified class, or Empty otherwise.
This method allows one to encapsulate any object in a Box in a null-safe manner, treating null values to Empty
This method allows one to encapsulate any object in a Box in a null-safe manner, treating null values to Empty
Full(in)
if in
is not null; Empty otherwise
This implicit transformation allows one to use an Option as a Box.
This implicit transformation allows one to use an Option as a Box.
a Box object from an Option. Full(in) if the Option is Some(in); Empty otherwise
This method allows one to encapsulate any object in a Box in a null-safe manner, treating null values to Empty.
This method allows one to encapsulate any object in a Box in a null-safe manner, treating null values to Empty. This is a parallel method to the Scala Option's apply method. Note that the apply method is overloaded and it's much, much better to use legacyNullTest in this case.
Full(in)
if in
is not null; Empty otherwise
(Since version 2.5) Use legacyNullTest
The Box companion object provides methods to create a Box from:
It also provides implicit methods to transform Option to Box, Box to Iterable, and Box to Option