@NonNull open static fun <R : Any!> success(@NonNull value: R): Try<R>
Creates a Success
from the given value. Please be aware that if the value is null then a null will get stored. If you don't want to store or process a potential null value please use Try#ofNullable(Object)
instead.
This method deliberately allows a null to be passed to conform with rules of monadic design.
value
- R: From this value a Success
will be created. Be aware that it allows null values.