package retrofit2.adapter.rxjava2; import retrofit2.Response; /* loaded from: classes2.dex */ public final class Result { private final Throwable error; private final Response response; private Result(Response response, Throwable th) { this.response = response; this.error = th; } public static Result error(Throwable th) { if (th != null) { return new Result<>(null, th); } throw new NullPointerException("error == null"); } public static Result response(Response response) { if (response != null) { return new Result<>(response, null); } throw new NullPointerException("response == null"); } public boolean isError() { return this.error != null; } public Throwable error() { return this.error; } public Response response() { return this.response; } }