You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The convert method returns T, and when a source is null, it returns the whenSourceIsNull value if it is present or an Exception.
While it might be the use case we want, some people might want a less strict method that could return null when the source is null, etc. To make it type-safe, the original convert method should still return T while the new method tryConvert should be created with return type T?.
The
convert
method returnsT
, and when a source is null, it returns thewhenSourceIsNull
value if it is present or anException
.While it might be the use case we want, some people might want a less strict method that could return null when the source is null, etc. To make it type-safe, the original
convert
method should still returnT
while the new methodtryConvert
should be created with return typeT?
.With spec
The text was updated successfully, but these errors were encountered: