package com.google.common.util.concurrent; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.AbstractFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /* loaded from: classes2.dex */ public abstract class FluentFuture extends GwtFluentFutureCatchingSpecialization { /* loaded from: classes2.dex */ static abstract class TrustedFuture extends FluentFuture implements AbstractFuture.Trusted { @Override // com.google.common.util.concurrent.AbstractFuture, java.util.concurrent.Future public final V get() throws InterruptedException, ExecutionException { return (V) super.get(); } @Override // com.google.common.util.concurrent.AbstractFuture, java.util.concurrent.Future public final V get(long j, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { return (V) super.get(j, timeUnit); } @Override // com.google.common.util.concurrent.AbstractFuture, java.util.concurrent.Future public final boolean isDone() { return super.isDone(); } @Override // com.google.common.util.concurrent.AbstractFuture, java.util.concurrent.Future public final boolean isCancelled() { return super.isCancelled(); } @Override // com.google.common.util.concurrent.AbstractFuture, com.google.common.util.concurrent.ListenableFuture public final void addListener(Runnable runnable, Executor executor) { super.addListener(runnable, executor); } @Override // com.google.common.util.concurrent.AbstractFuture, java.util.concurrent.Future public final boolean cancel(boolean z) { return super.cancel(z); } } public static FluentFuture from(ListenableFuture listenableFuture) { if (listenableFuture instanceof FluentFuture) { return (FluentFuture) listenableFuture; } return new ForwardingFluentFuture(listenableFuture); } @Deprecated public static FluentFuture from(FluentFuture fluentFuture) { return (FluentFuture) Preconditions.checkNotNull(fluentFuture); } public final FluentFuture catching(Class cls, Function function, Executor executor) { return (FluentFuture) Futures.catching(this, cls, function, executor); } public final FluentFuture catchingAsync(Class cls, AsyncFunction asyncFunction, Executor executor) { return (FluentFuture) Futures.catchingAsync(this, cls, asyncFunction, executor); } public final FluentFuture withTimeout(long j, TimeUnit timeUnit, ScheduledExecutorService scheduledExecutorService) { return (FluentFuture) Futures.withTimeout(this, j, timeUnit, scheduledExecutorService); } public final FluentFuture transformAsync(AsyncFunction asyncFunction, Executor executor) { return (FluentFuture) Futures.transformAsync(this, asyncFunction, executor); } public final FluentFuture transform(Function function, Executor executor) { return (FluentFuture) Futures.transform(this, function, executor); } public final void addCallback(FutureCallback futureCallback, Executor executor) { Futures.addCallback(this, futureCallback, executor); } }