of


Description:

public static Optional<T> of<T> (owned T value)

Creates an Optional containing the given value.

Example:

    var opt = Optional.of<string> ("hello");
assert (opt.get () == "hello");

Parameters:

value

the value to wrap.

Returns:

an Optional containing the value.