All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.core.link.ImportFuture Maven / Gradle / Ivy

package org.snapscript.core.link;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import org.snapscript.core.Entity;

public class ImportFuture implements Future{

   private final T entity;
   
   public ImportFuture(T entity) {
      this.entity = entity;
   }
   
   @Override
   public boolean cancel(boolean interrupt) {
      return false;
   }

   @Override
   public boolean isCancelled() {
      return false;
   }

   @Override
   public boolean isDone() {
      return true;
   }

   @Override
   public T get() throws InterruptedException, ExecutionException {
      return entity;
   }

   @Override
   public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
      return entity;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy