com.avsystem.commons.misc
Like Opt but has better Java interop thanks to the fact that wrapped value has type A instead of Any. For example, Scala method defined like this:
A
Any
def takeMaybeString(str: OptRef[String]): Unit
will be seen by Java as:
public void takeMaybeString(String str);
and null will be used to represent absence of value.
null
This comes at the cost of A having to be a nullable type.
Author: ghik Created: 07/01/16.
Like Opt but has better Java interop thanks to the fact that wrapped value has type
A
instead ofAny
. For example, Scala method defined like this:will be seen by Java as:
public void takeMaybeString(String str);
and
null
will be used to represent absence of value.This comes at the cost of
A
having to be a nullable type.Author: ghik Created: 07/01/16.