Option created from given @value @param value Value that should be wrapped in an Option @param Input type @return Some of the @value if it is not null, otherwise None
(@Nullable final IN value)
| 146 | * @return Some of the @value if it is not null, otherwise None |
| 147 | */ |
| 148 | @SuppressWarnings("unchecked") |
| 149 | @NotNull |
| 150 | public static <IN> Option<IN> ofObj(@Nullable final IN value) { |
| 151 | return value == null ? Option.NONE : new Some(value); |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Option of value returned by the function |
no outgoing calls