ForwardingCheckedFuture.java 1.32 KB
package com.google.common.util.concurrent;

import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

@Beta
public abstract class ForwardingCheckedFuture<V, X extends Exception>
  extends ForwardingListenableFuture<V>
  implements CheckedFuture<V, X>
{
  public V checkedGet()
    throws Exception
  {
    return (V)delegate().checkedGet();
  }
  
  public V checkedGet(long paramLong, TimeUnit paramTimeUnit)
    throws TimeoutException, Exception
  {
    return (V)delegate().checkedGet(paramLong, paramTimeUnit);
  }
  
  protected abstract CheckedFuture<V, X> delegate();
  
  @Beta
  public static abstract class SimpleForwardingCheckedFuture<V, X extends Exception>
    extends ForwardingCheckedFuture<V, X>
  {
    private final CheckedFuture<V, X> a;
    
    protected SimpleForwardingCheckedFuture(CheckedFuture<V, X> paramCheckedFuture)
    {
      this.a = ((CheckedFuture)Preconditions.checkNotNull(paramCheckedFuture));
    }
    
    protected final CheckedFuture<V, X> delegate()
    {
      return this.a;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/util/concurrent/ForwardingCheckedFuture.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */