Suppress warning for unchecked cast

This commit is contained in:
Paul Campbell 2018-06-24 08:16:54 +01:00
parent e9184f88bf
commit 8ec3069d1d

View file

@ -39,6 +39,7 @@ final class Nothing<T> implements Maybe<T> {
static final Maybe<?> INSTANCE = new Nothing<>(); static final Maybe<?> INSTANCE = new Nothing<>();
@Override @Override
@SuppressWarnings("unchecked")
public <R> Maybe<R> map(final Function<T, R> f) { public <R> Maybe<R> map(final Function<T, R> f) {
return (Maybe<R>) INSTANCE; return (Maybe<R>) INSTANCE;
} }