@Test public void itHandlesOk() throws Exception { assertThat(OK_RESULT.isOk()).isTrue(); assertThat(OK_RESULT.isErr()).isFalse(); }
@Override public boolean isOk() { return !super.isErr(); }
VoidResult extends Result<Void, ERROR_TYPE> { @Override public boolean isOk() { return !super.isErr(); } }
VoidResult extends Result<Void, ERROR_TYPE> { @Override public boolean isOk() { return !super.isErr(); } VoidResult(); }
VoidResult extends Result<Void, ERROR_TYPE> { @Override public boolean isOk() { return !super.isErr(); } VoidResult(); static VoidResult<E> ok(); static VoidResult<ERROR_TYPE> error(ERROR_TYPE error); @Override boolean isOk(); @Override void ifOk(Consumer<? super Void> consumer); @Override Result<NEW_SUCCESS_TYPE, ERROR_TYPE> mapOk(Function<Void, NEW_SUCCESS_TYPE> mapper); @Override Result<NEW_SUCCESS_TYPE, ERROR_TYPE> flatMapOk(Function<Void, Result<NEW_SUCCESS_TYPE, ERROR_TYPE>> mapper); abstract R match(Function<ERROR_TYPE, R> err, Function<Void, R> ok); }
VoidResult extends Result<Void, ERROR_TYPE> { @Override public boolean isOk() { return !super.isErr(); } VoidResult(); static VoidResult<E> ok(); static VoidResult<ERROR_TYPE> error(ERROR_TYPE error); @Override boolean isOk(); @Override void ifOk(Consumer<? super Void> consumer); @Override Result<NEW_SUCCESS_TYPE, ERROR_TYPE> mapOk(Function<Void, NEW_SUCCESS_TYPE> mapper); @Override Result<NEW_SUCCESS_TYPE, ERROR_TYPE> flatMapOk(Function<Void, Result<NEW_SUCCESS_TYPE, ERROR_TYPE>> mapper); abstract R match(Function<ERROR_TYPE, R> err, Function<Void, R> ok);  }