1 package cz.cuni.amis.utils.future; 2 3 import java.util.concurrent.TimeUnit; 4 5 public class FutureWrapper<RESULT> implements IFuture<RESULT> { 6 7 private IFuture<RESULT> impl; 8 9 public FutureWrapper(IFuture<RESULT> impl) { 10 this.impl = impl; 11 } 12 13 @Override 14 public boolean cancel(boolean mayInterruptIfRunning) { 15 return impl.cancel(mayInterruptIfRunning); 16 } 17 18 @Override 19 public RESULT get() { 20 return impl.get(); 21 } 22 23 @Override 24 public RESULT get(long timeout, TimeUnit unit) { 25 return impl.get(timeout, unit); 26 } 27 28 @Override 29 public boolean isCancelled() { 30 return impl.isCancelled(); 31 } 32 33 @Override 34 public boolean isDone() { 35 return impl.isDone(); 36 } 37 38 }